Re: How to use "FindResource"

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



In addition - also make sure that your DllMain returnes TRUE

--
Vladimir

"Ram" <koti@xxxxxxxxxxxxxxxxxx> wrote in message
news:eKCo71SBGHA.412@xxxxxxxxxxxxxxxxxxxxxxx
> hi,
>
> i am facing some problem ,while retriving the resource from dll. That dll
> is
> a "esource only dll". Here is the code,what i am using.
>
>
> HMODULE hmod;
> HRSRC hr;
>
> /*here testdll.dll is the dll created for testing purpose and it has
> bitmap1.bmp resource*/
>
>
> hmod=::LoadLibrary("testdll.dll");
> hr=::Findresource(hr,"bitmap1.bmp",RT_BITMAP);
>
> if(hr==NULL)
> MessageBox("This is not working");
> else
> MessageBox("This is Working");
>
>
> This is code i have written ,but when ever i run,i get only "This is not
> working" messagbox. This is means we unable to get the resource from dll.
>
> Can you suggest me, possible solution
>
> regards,
> Ram
>
>


.



Relevant Pages

  • Re: internationalisation
    ... So, for dialogs, we keep all of a projects dialogs in the exe rather than ... separate copies in each language dll. ... It shows you how to build dialogs without resource files. ...
    (microsoft.public.vc.mfc)
  • Re: ? Segregating a Dialogs Code (Particularly Resources)
    ... I typically put all of the common code in a single Dll, ... the projects that need access to the common code. ... Now the problem with my solution is that if one control, ... both resource files and drag the resources over to the new project. ...
    (microsoft.public.vc.mfc)
  • Re: multi-process singleton DLL
    ... creates an IPC server and manages the DLL resource. ... They both interface using this DLL I wrote to take care ... communicate with the IPC server, ... could bind to the protocol driver, the other would get "The requested ...
    (microsoft.public.vc.language)
  • Re: How to write a program with multi-language support but not needed to define "UNICOE"?
    ... Put each resource file with different langauge in different dll. ... standpoint of providing UI in multiple languages, ...
    (microsoft.public.vc.mfc)
  • Re: multi-process singleton DLL
    ... creates an IPC server and manages the DLL resource. ... They both interface using this DLL I wrote to take care ... communicate with the IPC server, ... procedure of opening the protocol driver and binding to it. ...
    (microsoft.public.vc.language)