|
-
Jan 1st, 2002, 06:11 PM
#1
Thread Starter
Fanatic Member
dll no workie
VB keeps saying "cannot find entry point", even when there is one!
heres the code
Code:
// fileshredderDLL.cpp : Defines the entry point for the DLL application.
//
#include "stdafx.h"
#include "fileshredderDLL.h"
BOOL APIENTRY DllMain( HANDLE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
// This is the constructor of a class that has been exported.
// see fileshredderDLL.h for the class definition
CFileshredderDLL::CFileshredderDLL()
{
}
int CFileshredderDLL::test(){
return 1;
}
int TEST2(){
return 1;
}
// This is an example of an exported variable
FILESHREDDERDLL_API int nFileshredderDLL=0;
// This is an example of an exported function.
FILESHREDDERDLL_API int fnFileshredderDLL(void)
{
return 42;
}
i try calling test(), TEST2(), and fnFileshredderDLL(void) from VB, and from each of there, it doesnt work
another ? - do i put all of my functions in the CFileshredderDLL class, or outside of the class?
thanks alot -
nabeel
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Jan 1st, 2002, 07:07 PM
#2
All of your functions need to be __stdcall to work in VB.
Might solve the problem, dunno =).
Z.
-
Jan 1st, 2002, 07:14 PM
#3
Thread Starter
Fanatic Member
nope didnt work
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Jan 1st, 2002, 08:22 PM
#4
Thread Starter
Fanatic Member
i found a guide, and did it that way
the DLL is only 24kb 
vs. the 100kb+ the other one was givin
Visit www.fragblast.com
Gaming, forums, and a online RPG/Battle system
(__Flagg) DOT NET? is this a Hindi Dating service?
-
Jan 6th, 2002, 11:05 AM
#5
You can't use C++ classes in VB unless you implement them as COM objects, so much is sure.
And as Zaei said, all functions must be __stdcall.
Remove the FILESHREDDER_API, it helps you nothing for VB. Write a .def file instead.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
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
|