LONG APIENTRY myFunction(HWND hwnd, LPLONG lpIValue, LPSTR lpszValue)
To export it properly i added
extern "C" __declspec( dllexport )
The problem was that IS could find the function in the DLL, so I had a look at the DLL in dumpbin.exe and found that the function had been renamed to _myfunction@12. when I called the function with that name from IS it all works. It appears to be APIENTRY that causes the function to rename but I need APIENTRY to get i to work with IS. I could just call the functions by the name I get by Dumpbin but I'd rather get to the bottom with this..
I'd be a happy chap if someone could tell me what is happening..