i have a bunch of data i want to pass to CreateThread. i created a struct as per the msdn documentation. here it is:
typedef struct ThreadRecvData
{
std::list<char> data;
Ogre::String addr;
unsigned long port;
} THREADRECVDATA, *PTHREADRECVDATA;
then i initialise the struct, again as per the msdn documentation:
PTHREADRECVDATA pThreadRecvData;
pThreadRecvData = (PTHREADRECVDATA) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(THREADRECVDATA));
pThreadRecvData->addr = "123";
pThreadRecvData->port = 123;
pThreadRecvData->data.push_back('x');
i get a crash at pThreadRecvData->data.push_back('x').
can anyone help ?
thank you.