Topic moved here (http://www.jose.it-berater.org/smfforum/index.php?topic=4688.msg18228;topicseen#msg18228)
I did a small change to the thread creation source code and i added two missing {} in the WM_COMMAND, to let it work.
Now the zTrace.dll 64-bit is alive, at least by me ;D
that would help me to further debug my 64-bit DLL(s)...
Patrice,
I was able to compile in both 32 and 64 bit with the cl from the 7.1 SDK.
I get the zTrace window when testing but the text is gibberish.
Can you show just a simple demo of it's use?
James
James--
it is using UNICODE !!!
I shall post very soon the compiled version for 32/64 bit (both working in Unicode)
The original PowerBASIC version works in ANSI.
I know it's unicode and I did figure out you need to pass a WCHAR string but I wanted to see a c++ snippet of calling it from you.
BTW I compiled both 32 and 64 bit dll's without name mangling so I can easily call zTrace from any language.
Good work.
James
Ok I got it.
It was in the declare so I could pass a wstring -> ws.c_str()
I needed const and you should probably add it to the function also.
James
typedef LONG_PTR (__cdecl *BCXFPROT1)(const WCHAR*);
static BCXFPROT1 zTrace;
int WINAPI WinMain (HINSTANCE hInst,HINSTANCE hPrev,LPSTR CmdLine,int CmdShow)
{
// **********[ DLL Declarations ]**********
HMODULE H_ZTRACE64 = LoadLibrary("ztrace64.dll");
zTrace=(BCXFPROT1)GetProcAddress(H_ZTRACE64, "zTrace");
// ****************************************
wstring ws;
LONG_PTR rv;
ws= L"James";
rv= zTrace( ws.c_str());
MessageBox (GetActiveWindow(),(join(2,"rv = ",str(rv))),"",0);
}
Patrice,
I only tested the zTrace function but the dll's I created work with:
MinGW gcc 32/64
MinGw g++ 32/64
VC++(wiin 7.1 sdk) 32/64
Borland c++ 5.5 32
PellesC 7R 32/64
Tiny c 32
James