Solved

A resource DLL

Posted on 1997-04-06
1
233 Views
Last Modified: 2010-08-05
Hello,
I use Visual C++ 5.0 (moved from 4.2)
I have created a new "project" which is a regular DLL
(not MFC) and I want it to be a "resource" bank for my
application. which means- ALL resourced will be in it and
nowhere else, so i can create a multi-language app that
uses a different DLL for any langauge.

I have added resources to this DLL, all's ok. but when I
compile it, it stops with a link error and says something
about a "DllInit" something function which is missing...
what function am i suppose to add, and most important-
WHERE, WHAT FILE should I add to my Resources DLL....

Thanks.
0
Comment
Question by:magid
1 Comment
 
LVL 23

Accepted Solution

by:
chensu earned 50 total points
ID: 1162612
In addition to all the resources, you should also add a .C or .CPP file which includes the following function,

#include <windows.h>

BOOL APIENTRY DllMain( HANDLE hModule,
                        DWORD ul_reason_for_call,
                        LPVOID lpReserved )
{
    /*switch( ul_reason_for_call ) {
    case DLL_PROCESS_ATTACH:
    ...
    case DLL_THREAD_ATTACH:
    ...
    case DLL_THREAD_DETACH:
    ...
    case DLL_PROCESS_DETACH:
    ...
    }*/
    return TRUE;
}

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

813 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now