Article ID: 102352
Article Last Modified on 11/21/2006
HANDLE CreateThread(lpsa, cbStack, lpStartAddr, lpvThreadParm,
fdwCreate, lpIDThread)
LPSECURITY_ATTRIBUTES lpsa; /* Address of thread security attrs */ DWORD cbStack; /* Initial thread stack size*/ LPTHREAD_START_ROUTINE lpStartAddr; /* Address of thread function */ LPVOID lpvThreadParm; /* Argument for new thread*/ DWORD fdwCreate; /* Creation flags*/ LPDWORD lpIDThread; /* Address of returned thread ID */
error C2643: illegal cast from pointer to member
DLGPROC GRAYSTRINGPROC EDITWORDBREAKPROC LINEDDAPROC ENHMFENUMPROC MFENUMPROC ENUMRESLANGPROC PROPENUMPROC ENUMRESNAMEPROC PROPENUMPROCEX ENUMRESTYPEPROC TIMERPROC FONTENUMPROC WNDENUMPROC GOBJENUMPROC
#include <windows.h>
int x; int y;
A() { x = 0; y = 0; }
static StartRoutine( A * ); // Compiles clean, includes "this" pointer};
void main( ){
A a;
DWORD dwThreadID;
CreateThread( NULL,
0, (LPTHREAD_START_ROUTINE)(a.StartRoutine), &a, // Pass "this" pointer to static member fn 0, &dwThreadID
);}
Additional query words: 3.10 3.50 4.00
Keywords: kbinfo KB102352