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?