PDA

Click to See Complete Forum and Search --> : DLL'S??


Vlatko
Sep 19th, 2000, 03:20 PM
I want to know how can i call a function from a c++ dll from VC++or VB,how can i call MyFunction() in this case; Can someone explain or suggest some links covering this topics.


#include "stdafx.h"

MyFunction()
{
Do something
}

BOOL APIENTRY DllMain(HANDLE hModule, DWORD dwReasonForCall, LPVOID lpReserved) {
switch(dwReasonForCall) {
case DLL_PROCESS_ATTACH: {
break;
}
case DLL_PROCESS_DETACH: {
break;
}
}
return TRUE;
}

parksie
Sep 19th, 2000, 03:26 PM
I'll send you an example project showing how to use DLLs in C++.