View Single Post
Old 04-22-2005, 04:35 PM   #2 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 678
DJMaze is on a distinguished road
yes there is.
You can load dll's dynamicly
Code:
HMODULE my_dll = LoadLibrary("A.dll");
After that you must load all ProcAddresses that you need, for example
Code:
typedef WINSHELLAPI void (WINAPI *pILFree)(LPCITEMIDLIST pidl);
pILFree ILFree = (pILFree)GetProcAddress(my_dll, MAKEINTRESOURCE(195));
This creates a pointer to the function that is inside the dll.

GetProcAddress() can be used in 2 ways:
#1 by position (INTRESOURCE)
#2 by name GetProcAddress(my_dll, "winampDSPGetHeader2");

the typedef part is used to identify the function as how it is inside the dll.
I think i'm not 100% here so others could addl in or correct me

Then when you don't need the dll anymore you use
Code:
FreeLibrary(my_dll);
DJMaze is offline   Reply With Quote