matwachich Posted June 22, 2019 Posted June 22, 2019 Hi guys! I'm actually trying to make a wrapper for https://www.gnu.org/software/libmicrohttpd/ Any idea how to call this function with DllCall??? _MHD_EXTERN struct MHD_Daemon * MHD_start_daemon_va (unsigned int flags, uint16_t port, MHD_AcceptPolicyCallback apc, void *apc_cls, MHD_AccessHandlerCallback dh, void *dh_cls, va_list ap); // or this one _MHD_EXTERN struct MHD_Daemon * MHD_start_daemon (unsigned int flags, uint16_t port, MHD_AcceptPolicyCallback apc, void *apc_cls, MHD_AccessHandlerCallback dh, void *dh_cls, ...); Thanks
Gianni Posted June 22, 2019 Posted June 22, 2019 P.S. I do not intend to hijack this topic, but perhaps following link may interest you as well https://www.autoitscript.com/forum/topic/68851-powerful-http-server-in-pure-autoit/ Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
matwachich Posted June 22, 2019 Author Posted June 22, 2019 Hi! Yes... but No! I already saw all HTTP server topics and I need a... REAL server (notably: handling multipart/form-data to handle file uploads). This is why I need to wrap this GNU library (that seems rather complete). I'm in parallel trying to create an AutoIt based web server UDF (and not an executable), but I feel like re-creating the wheel. But, if I can't port GNU microhttpd, I will complete my AutoIt based HTTP server and share it!
Danyfirex Posted June 23, 2019 Posted June 23, 2019 Hello. It seems to be an array of values. I wrote this example to illustrate it better. Local $tvarlist = DllStructCreate("ptr[3]") Local $sString="Croacia" Local $tstring = DllStructCreate("wchar string[" & StringLen($sString) +2 & "]") $tstring.String =$sString DllStructSetData($tvarlist, 1, 10, 1) DllStructSetData($tvarlist, 1, 1856, 2) DllStructSetData($tvarlist, 1, DllStructGetPtr($tstring), 3) Local $tOutput = DllStructCreate("wchar Value[1024]") Local $sString = "Nikola Tesla nació el %ld de julio de %ld en Smiljan, %s." Local $aCall = DllCall("User32.dll", "int", "wvsprintfW", "ptr", DllStructGetPtr($tOutput), "wstr", $sString, "ptr", DllStructGetPtr($tvarlist)) ConsoleWrite($tOutput.Value & @CRLF) Saludos trancexx and matwachich 2 Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now