32位DLL上的CreateThread不会将数据传递给新线程,但64位工作

时间:2014-03-19 00:44:41

标签: multithreading

void ExecuteDispatchThread(LPVOID lpParam)
{
PTHREADdata pDataArray;
pDataArray = (PTHREADdata)lpParam;

}
void InitMultiThread(__GLcontextModes *modes, IGLcontextVersion *version,  __WGLcontext *glrc)
{
PTHREADdata pDataArray = (PTHREADdata) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(THREADdata));
pDataArray->modes = modes;
pDataArray->version = version;
pDataArray->glrc = glrc;
DWORD RenderThreadID;
m_DrawThread = CreateThread(
NULL,
0,
(LPTHREAD_START_ROUTINE) ExecuteDispatchThread,
(LPVOID)pDataArray,
0,
&RenderThreadID); 
}

在64位编译时,新线程上的lpParam获取了从pDataArray传递的地址。但在32位DLL上,lpParam为零。任何人都看过这个或知道如何解决这个问题?提前谢谢..

0 个答案:

没有答案