[Dev-C++] loading dlls multiple times
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <Ech...@ne...> - 2002-01-16 16:05:05
|
If I load a dll twice, do I get another copy of the data in the dll, or do I reuse the data from the previous loading.
for example:
dll.c
void dll_fcn(){
static int num = 0;
printf("%d", num);
num++;
}
man.c
int main()
void (*fcn)();
lib = LoadLibrary("dll.dll");
fcn = getProcAddress(lib, "dll_fcn");
fcn();
lib2 = LoadLibrary("dll.dll");
fcn = getProcAddress(lib2, "dll_fcn");
fcn();
// free libraries
return 0;}
will this print 00 or 01?
Thanks for any help.
Evan Hempel
--
__________________________________________________________________
Your favorite stores, helpful shopping tools and great gift ideas. Experience the convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/
Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/
|