Method for making thread functions into member functions

xiaoxiao2021-03-06  21

Static DWORD WINAPI Thread_Func (LPVOID Instance);

Pass the THIS pointer to Instance

(Cclassname *) PTHIS = (cclassname *) instance;

Then use PTHIS in the thread function instead of this. (Static member function cannot directly use this pointer)

转载请注明原文地址:https://www.9cbs.com/read-40336.html

New Post(0)