[fpc-pascal] GetCurrentThreadID to string
Graeme Geldenhuys
graemeg.lists at gmail.com
Thu May 21 10:01:33 CEST 2009
Hi,
How do I convert the GetCurrentThreadID() result to a string?
At the moment for Linux and Windows the following works:
var
lsThreadID: string
begin
lsThreadID := IntToStr(GetCurrentThreadID);
But under Mac OS the above code gives me the following error:
Error:
Incompatible type for arg no. 1: Got "Pointer", expected "QWord"
Now I could use PtrInt or Format(), but that means I have to IFDEF the
code for Mac OS which I would rather want to prevent. I don't like
distributing IFDEFs in my code. Is there some "safe" way of doing
this that will work for all supported platforms?
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the fpc-pascal
mailing list