I'm trying to port some code to 64-bit, but it seems that the thread address identifier in _beginthreadex
is unsigned int
which is 32-bits and I can't pass/receive a 64-bit address identifier from the function:
uintptr_t _beginthreadex( // NATIVE CODE
void *security,
unsigned stack_size,
unsigned ( __stdcall *start_address )( void * ),
void *arglist,
unsigned initflag,
unsigned *thrdaddr // <-- 32-bit address
);
I checked the MSDN documentation, but I didn't see a 64-bit version of the function. Am I including the wrong header, per-processor flag or is there some other way to create a thread with a 64-bit address identifier?
Update
The documentation states that the thrdaddr
parameter is 32-bit:
Thrdaddr
Points to a 32-bit variable that receives the thread identifier. Might be NULL, in which case it is not used.