- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm almost done creating a Win32 version of my project which works fine under x64.
The problem I am having at the moment is that the DllMain function in my DLL is not being called when the DLL is being loaded. It is being called under x64.
Do I have to do something special to get it to be called under Win32?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You have to give it the correct name. On 32-bit, it is a STDCALL routine _DllMain@12 . (Use !DEC$ ATTRIBUTES STDCALL, DLLEXPORT, ALIAS:"_DllMain@12").
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That worked, thanks (I added :: DllMain at the end)
!DEC$ ATTRIBUTES STDCALL, DLLEXPORT, ALIAS:"_DllMain@12" :: DllMain
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page