Kevin,
I tried your fix but it still fails.
My dll is c++ 64bit code. there is another wrinkle I just noticed (note this works)
My code:
$CCODE
__declspec(dllexport) BOOL WINAPI DllMain (HINSTANCE hInst, DWORD Reason, LPVOID Reserved)
{
switch (Reason)
{
case DLL_PROCESS_ATTACH:
printf("%s\n", "'=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*");
printf("%s\n", " jcf bcxpp.dll version 1.0.2 has loaded");
printf("%s\n", "'=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*");
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
return TRUE;
}
$CCODE
'==============================================================================
But. BCX Adds a couple of goodies even to MY $CCODE wrapped c/c++ code.
// *************************************************
// System Variables
// *************************************************
static unsigned char* UprCase;
and
UprCase = (unsigned char*)calloc(257, 1), UprCase = MakeUCaseTbl();
Again note this works.
// *************************************************
// System Variables
// *************************************************
static unsigned char* UprCase;
//------------------------------------------------------------------------------
__declspec(dllexport) BOOL WINAPI DllMain (HINSTANCE hInst, DWORD Reason, LPVOID Reserved)
{
UprCase = (unsigned char*)calloc(257, 1), UprCase = MakeUCaseTbl();
switch (Reason)
{
case DLL_PROCESS_ATTACH:
printf("%s\n", "'=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*");
printf("%s\n", " jcf bcxpp.dll version 1.0.2 has loaded");
printf("%s\n", "'=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*");
break;
case DLL_PROCESS_DETACH:
break;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
}
return TRUE;
}
To continue this saga I found this works. Note I added AS BOOL per MSDN ( yeah anal I know)
FUNCTION DllMain(hInst AS HINSTANCE, Reason AS DWORD, Reserved AS LPVOID) AS BOOL EXPORT
SELECT CASE Reason
'**************************************************************
CASE DLL_PROCESS_ATTACH
! UprCase = (unsigned char*)calloc(257, 1), UprCase = MakeUCaseTbl();
? "'=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*"
? " jcf bcxpp.dll version 1.0.1 has loaded"
? "'=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*"
'**************************************************************
CASE DLL_PROCESS_DETACH, DLL_THREAD_ATTACH, DLL_THREAD_DETACH
END SELECT
FUNCTION = TRUE
END FUNCTION
I am using iReplace in my ProcessLine Function and I guess this is why it failed?
adding ! UprCase = (unsigned char*)calloc(257, 1), UprCase = MakeUCaseTbl();
fixed it. Try adding iReplace in your ProcessLine BcxPP.dll source and see if it fails.
I am not sure how to code:
! UprCase = (unsigned char*)calloc(257, 1), UprCase = MakeUCaseTbl();
In Bcx
James