|
-
Apr 28th, 2000, 09:36 AM
#1
Thread Starter
Conquistador
Could someone please send me the src for a dll file that they have made, and tell me how to access it in my programs??
-
Apr 28th, 2000, 11:14 PM
#2
there are two articles in the activex topic section that explain a simple dll and how to use them... they are towards the end... the articles are about working with objects... they will show you how to creat a dll object... then how to use them...
-
Apr 29th, 2000, 10:55 AM
#3
Thread Starter
Conquistador
-
Apr 30th, 2000, 05:29 AM
#4
//all necessary includes
//standard entry point of any Win dll
BOOL WINAPI DllMain(HANDLE hModule,DWORD ul_reson_for_call,
LPVOID lpReserved)
{
switch(ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
break;
case DLL_PROCESS_DETACH:
break;
}
return(TRUE);
}
//C++ implementation
extern "C"
{
//your declarations go here
extern__declspec( dllexport) long YOURFUNCTIONNAME(YOURPARAMETERS);
}
long YOURFUNCTIONNAME(YOURPARAMETERS)
{
//your code goes here
return 0;
}
then from your vb application do:
Declare Function YOURFUNCTIONNAME lib "YOURDLLNAME.dll"(YOURPARAMETERS) as long
and then
call YOURFUNCTIONNAME(YOURPARAMETERS)
-
Apr 30th, 2000, 02:33 PM
#5
Thread Starter
Conquistador
thanks, but i was kind of thinking along the line of vb code and not c, but it doesn't matter, i have made a dll now
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|