Why I run INITMODULE function return 0, but correct is some number not 0
I have a dll file.
C code
- Code: Select all Expand view
unsigned long InitModule ( char* pszModuleName, ;
void* pInitArgs, ;
unsigned long* pulModuleHandle);
FWH code
- Code: Select all Expand view
INITMODULE("HCAPKCS11",@hICModule)
#pragma BEGINDUMP
#include "windows.h"
#include "hbapi.h"
int WINAPI InitModule( LPSTR pszModuleName, void * pInitargs, LPDWORD pulModuleHandle);
HB_FUNC( INITMODULE)
{
LPSTR pszModuleName = (char *) hb_parc(1);
LPDWORD pulModuleHandle = hb_parnl(2);
LONG err;
err=InitModule( pszModuleName, NULL, &pulModuleHandle );
hb_retnl(err);
}
#pragma ENDDUMP