HANDLE CreateThread(
LPSECURITY_ATTRIBUTES lpThreadAttributes, // pointer to security attributes
DWORD dwStackSize, // initial thread stack size
LPTHREAD_START_ROUTINE lpStartAddress, // pointer to thread function
LPVOID lpParameter, // argument for new thread
DWORD dwCreationFlags, // creation flags
LPDWORD lpThreadId // pointer to receive thread ID
);
DWORD WINAPI ThreadProc(
LPVOID lpParameter // thread data
);
过程函数传递一个lpParameter过来,我又要怎样将这个LPVOID类型的转成CString类型的,高分悬赏,我已试过几次,都没用,CString str="Hello World";
(LPVOID)str.GetBuffer()转化成LPVOID指针,过程函数中
CString rec=(LPCTSTR)lpParameter,然后用MessageBox(rec),出现的提示框为空内容是怎么回事,它们之间到底要怎么转换?
说错了,是参数4来送参数的 LPVOID lpParameter,
按你这方法编译没问题,但运行到CString rec = *(CString*)lpParameter; 时说读取oxffffff0时发生冲突