- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A static lib includes a dialog "resource" which is later linked into a DLL.
The DLL seems to compile fine when calling the routine from the static lib.
However, when called, the DLGINIT fails.
What does this mean? Is something missing ot opeb the dialog?
The application has access to the LIB, MOD files for the static lib as well as two mystery files
in the release filder: RCA01044. and the dialog's .RES file. are these even necessary?
Thanks
The DLL seems to compile fine when calling the routine from the static lib.
However, when called, the DLGINIT fails.
What does this mean? Is something missing ot opeb the dialog?
The application has access to the LIB, MOD files for the static lib as well as two mystery files
in the release filder: RCA01044. and the dialog's .RES file. are these even necessary?
Thanks
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Every resource-loading function expects a hInstance, which describes which module (.exe/.dll) contains the resource. That includes DlgInit; by default, DlgInit tries to load the resource from .exe file, and it will fail in your case. Instead, you need the form described in DlgInitWithResourceHandle (did you RTFM for DlgInit ;-)? ). You can obtain hinst parameter either by
- saving hInstDll argument of DllMain or
- calling GetModuleHandle("mydll.dll"C).
.Res file is equivalent of .obj file. However, I'm not sure if it can be linked within a static library -- can it? Even if it can, note that There Shall Be Only One Res File Within a Module, so you cannot add any additional .rc files in containing project.
Jugoslav
- saving hInstDll argument of DllMain or
- calling GetModuleHandle("mydll.dll"C).
.Res file is equivalent of .obj file. However, I'm not sure if it can be linked within a static library -- can it? Even if it can, note that There Shall Be Only One Res File Within a Module, so you cannot add any additional .rc files in containing project.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks,
That solved it. Also I was not aware the res file is like the obj file. I needed to add it to the command line compile commands.
Tim
That solved it. Also I was not aware the res file is like the obj file. I needed to add it to the command line compile commands.
Tim
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