Consider a code excerpt below:
typedef struct tagTHREADNAME_INFO {
DWORD dwType;
LPCTSTR szName;
DWORD dwThreadID;
DWORD dwFlags;
} THREADNAME_INFO;
const THREADNAME_INFO info = { 0x1000, threadName, CurrentId(), 0};
::RaiseException(kVCThreadNameException, 0,
sizeof(info) / sizeof(ULONG_PTR),
(ULONG_PTR*)&info);
How to cast correctly into ULONG_PTR* using C++ style cast?
p.s. it's platform dependent code.