Solved

A resource DLL

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

744 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

12 Experts available now in Live!

Get 1:1 Help Now