-
Dll/api
I am trying to make a DLL which will call an API function for me. (VB is picky about using SetWindowLong with apps not woned by u). I really don't know C++ well, and am using whatever tutorials I can find. It works ok, when making a dummy function (int a(){return 5;}) but when i try to have the function call an API function (eg, clipcursor, setparent), i get this error in VB: Bad DLL calling convention. can anyone help?
-
hmmm, it seems to work when I put it in a class using a MFC dll.
-
I don't know if the search will accept this, but try C++ DLL in the search.
The calling convention is merely how it calls the function:
Code:
int __stdcall func() {
return 0;
}
__stdcall is the convention for DLL functions.