Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

DLL problem


1 reply to this topic

jive02

jive02
  • Members
  • 40 posts

Posted 23 February 2002 - 11:04

I've made a DLL that I wan't to call from my installation. I read that the function had to be like this:

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..




Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 24 February 2002 - 22:56

You must add a .def file to your VC project