[fpc-pascal]When to use pointers with win32

Hans MÃ¥rtensson hm at os.dk
Mon Nov 25 19:30:21 CET 2002

At 07:21 25-11-02 +0100, you wrote:
>The header files are translated from C. Where Delphi defined a definition
>with const or var parameters then that version is added as an overloaded
>definition. So you can use both the C calling with passing the address. Or
>use the Delphi way with passing a value to a var parameter

OK that makes sense, but then again: The following line:
waveInThread := CreateThread(0, 0, @waveInProc, 0, 0, @threadID);

gives me the compiler error:
Incompatible type for arg no. 6: Got VOID_POINTER, expected ULONG

whereas the line:
waveInThread := CreateThread(0, 0, @waveInProc, 0, 0, threadID);
compiles with no errors.

(threadID is declared as cardinal)

Hans Maartensson

med venlig hilsen
Hans MÃ¥rtensson

More information about the fpc-pascal mailing list