Re: resource dll problem

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Mihai N. wrote:
BTW satelite dlls work that way you do use same IDs.
I read in MSDN about that.

You will have to then load the resrouce from that specific DLL though. I
dont think you are doing that. You can use AfxSetResourceHandle for it.

This is aknowledged as "best industry standard" at this point.
Same IDs in different dlls, one dll/language, explicitely LoadLibraryEx
and use that handle to retrieve the resources.


I dont really know. We did not use this way. We used CDynLinkLibrary
and it worked fine for us. The reason I mentioned this was that you had
earlier mentioned this along with a codeproject link(dllswitchXX) and
it kind of made sense for some people. To me having a resource chain in
a large prooject makes a lot of sense. It does require initial
bookkeeping though. Use AfxSetResoureHandle requires the user to know
where to find the resource. On other hand, if you use CDynLinkLibrary,
no such assumption needs to be made.

---
Ajay

.



Relevant Pages

  • AfxSetResourceHandle
    ... I build my satellite DLL from the .rc and resourceppc.h file of my main ... The issue is that when my app run, it still use the resource that come ... with the exe even I successfully load and set resource the dll. ... Do I have to do something else beside call AfxSetResourceHandle()? ...
    (microsoft.public.pocketpc.developer)
  • Re: Show Dialog exported from DLL
    ... AfxSetResourceHandle() function called when i work on EVC4. ... resource handle to the DLL before using the DLL's resource. ...
    (microsoft.public.vc.mfc)
  • Re: Localize MFC DLL into resource only DLLs
    ... I've had so many bugs where I've loaded a DLL that grabbed the resource handle for the application instance that it just makes me gun-shy. ... My method of having a resource loader object, which calls AfxSetResourceHandle() in its constructor and then calls it again to set the old resource handle in its destructor, works fine from a DLL. ...
    (microsoft.public.vc.mfc)
  • Re: Why is my DLL not able to contain any resource (dialog resource)
    ... class for dialog in DLL). ... put dialog resource in Application module and class for that in DLL ... And about CDynLinkLibrary I dont know much. ... Jigar Mehta ...
    (microsoft.public.vc.mfc)
  • Show Dialog exported from DLL
    ... I have a DLL export some dialog, the DLL have its own resource of ... The client application can show the dialog without any ... AfxSetResourceHandle() function called when i work on EVC4. ... resource handle to the DLL before using the DLL's resource. ...
    (microsoft.public.vc.mfc)