![]() |
Separate resource into a separate DLL
1 Attachment(s)
Its always a good practice to have the resource into a seperate DLL. The major benefit of having the resource into seperate dll is, it can be easily skinned. Also it has the benefit of seperating the GUI from the code which is better for maintainance.
Here are the simple steps to do the same. Create a new Win32 Dynamic-Link Library With a simple Win32 Dll project. Add the following resource file to the project SepRes.rc Code: CPP
Code: CPP
Now add new MFC Dialog based application project to the workspace. Remove the rc and the resource.h file from the dialog based application workspace. You can even safely delete them from the Hard disk after removing them from the workspace. or even can edit it to have the version info for the executable. Now add the following lines to the InitInstance of the application Code: CPP
Thats it Run the application. |
Re: Seperate resource into a seperate DLL
Hi,
Thanks for that tip. I don't understand how can i keep my version on the executale if i remove the resources from the executable, and point to another resource file. :confused: Thanks! |
Re: Seperate resource into a seperate DLL
You can have a resource file in the executables having the
VS_VERSION_INFO info and move the other resources like the dialogs/bitmaps ... to a seperate dll. |
Re: Seperate resource into a seperate DLL
Quote:
Will it effect in my dll gettin registered??? |
Re: Seperate resource into a seperate DLL
Quote:
|
Re: Seperate resource into a seperate DLL
hmmm... but will the version mentioned over there has any effect on my Dll getting registered upon build???
well, wht actually happenin over here is tht i'm getting an error upon build. Either it says 1. unresolved external symbols DllRegisterServer & DllUnRegisterServer alongwith failure during build of exports file. OR 2. A tool returned an error code from "Performing Registration" Do u know y i'm gettin these :confused: |
Re: Seperate resource into a seperate DLL
You don't have the necessary libs/obj for DllRegisterServer / DllUnRegisterServer
|
Re: Seperate resource into a seperate DLL
ok... n wht cld b done abt it???
|
Re: Seperate resource into a seperate DLL
Quote:
Quote:
|
Re: Seperate resource into a seperate DLL
Well I followed exactly same procedure as mentioned above, but after copying the dll into the Output folder of the MFC Dialog Application project the dialog doesn't appear and exits with the code 0 (0x0)..
May I know any solution for this...??? |
Re: Seperate resource into a seperate DLL
Dialog appears and exits. Looks like you been doing something wrong. Try running the attachment in MS VC compiler preferably 6. It should copy the necessary dll into the correct folder.
|
Re: Seperate resource into a seperate DLL
Well I exactly followed the steps given by you..
Not a single change I'd done or missed out anything you directed to... |
Re: Seperate resource into a seperate DLL
Try running the attachment. I have done it and work as expected.
|
Re: Seperate resource into a seperate DLL
Well Mr.Shabbir I am sorry for the above comments. Everything worked fine. I made a mistake while calling the DLL function...
|
Re: Seperate resource into a seperate DLL
Quote:
|
Re: Separate resource into a separate DLL
Well Shabbir,
Hi. Try running this using MFC in a Static Library. It gives for an error. |
Re: Separate resource into a separate DLL
And how do I know what is the error unless you give me access to your brain or PC.
|
Re: Separate resource into a separate DLL
i will try to execute and understand this code
|
| All times are GMT +5.5. The time now is 19:24. |