Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How do I make a dll of just resources?

Posted on 2003-02-21
3
Medium Priority
?
232 Views
Last Modified: 2013-11-20
I have an application that includes dialogs and tabs and bitmaps.  I want to break up this application into 1 exe and many DLLs.  One of the DLLs should contain just bitmaps and resources.  How can I create a DLL with just bitmaps, string tables and other resources (even the images of dialog boxes) and be sure that the exe and other dlls will still be able to use these bitmaps?  The other DLLs and exe should be able to call the DoModal function of a class and the class should be able to use the bitmap that is in this bitmap dll.  
0
Comment
Question by:shiju_luke
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
codez80 earned 750 total points
ID: 7999922
make your dll as usual,

export a function from your dll:

HRESOURCE __declspec(dllexport) GetDLLResource(LPCTSTR lpszResource);


then in the implementation of that function use Win32 API LoadResource, and make sure when you call that method you mention DLL handle, (if you are in MFC do this: AFX_MANAGE_STATE(); HANDLE hDLL = AfxGetApp()->m_hModule; )

the handle returned from that function can be used in your executable or any other DLL

good luck

if you need more details let me know and I'll tell you about it (if I know!)

codez80

0
 
LVL 86

Expert Comment

by:jkr
ID: 8043070
Hmm, wasn't that all covered in the MSDN links also?
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question