View Single Post
Old Sep 3rd, 2004, 3:35 AM   #1
vbtoosharp
Newbie
 
Join Date: Aug 2004
Posts: 5
Rep Power: 0 vbtoosharp is on a distinguished road
I want to be able to load a known function from a DLL that is not know until run-time.

The program looks in a directory for DLLs and then loads them and calls a function common to all the dlls in that directory.

In C++ this is cake but I can’t find an equivalent for VB.NET anywhere.

below is some Pseudo code for those that don't know what i want to do.

typedef unsigned char* (__stdcall *Buffer)();
Buffer buf;
HINSTANCE LoadMe;
char* loc = "xbcdrc.dll"; //could do be any dll
LoadMe = LoadLibrary(loc);
buf = (Buffer)GetProcAddress(LoadMe, "GetBuffer");
vbtoosharp is offline   Reply With Quote