The solution is simply change "DummyRun" function type to:


static unsigned _stdcall DummyRun( void* p_data );

Define your CreateThread with:


h = CreateThread( NULL, 0,...