Quantcast
Channel: AutoIt v3 - Developer Chat
Viewing all articles
Browse latest Browse all 750

DllCall for C++

$
0
0

Hey! Currently i'am trying to programm a funktion like DllCall for C++. Do you got any tricks how to handle the specification of the variables as string?

 

sample:

DllCall("Dllname", "ReturnType", "FunctionName", "float", $fHeight, "float", $fWidth)

 

Currently i have to programm for every funtion that i want to include something like this:

HRESULT URLDownloadToFileA(LPUNKNOWN pCaller,LPCSTR szURL,LPCSTR szFileName, DWORD dwReserved,LPBINDSTATUSCALLBACK lpfnCB) {    typedef HRESULT (P_OT)(LPUNKNOWN, LPCSTR, LPCSTR,DWORD,LPBINDSTATUSCALLBACK);    P_OT* OT;    HMODULE hLib;    hLib = LoadLibraryA("Urlmon.dll");    if(hLib)    {       OT = (P_OT*)GetProcAddress(hLib, "URLDownloadToFileA");       if(OT)          return OT(pCaller,szURL,szFileName, dwReserved,lpfnCB);       else          return NULL;    }    else       return NULL; }

Viewing all articles
Browse latest Browse all 750

Latest Images

Trending Articles



Latest Images