nabeels786
Jan 1st, 2002, 05:11 PM
VB keeps saying "cannot find entry point", even when there is one!
heres the 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
heres the 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