Solved

A resource DLL

Posted on 1997-04-06
1
225 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

911 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

16 Experts available now in Live!

Get 1:1 Help Now