This is my first time dealing with windows. I tried to create thread, but I can't compile my code.
This is a part of my code:
WORD _tid;
HANDLE readerThread= CreateThread(0,0,readFromPort,0,0,&_tid);
DWORD WINAPI readFromPort(LPVOID lpParam ){}
I also tried :
LPDWORD_tid;
HANDLE readerThread= CreateThread(0,0,readFromPort,0,0,_tid);
DWORD WINAPI readFromPort(LPVOID lpParam ){}
Neither compiled. onyone knows what is the problem?
(I'm using windows xp)
thanks.
well, don't know what's error you have. But can provide a good example to you
difference to yours:
_tid is DWORD, not WORD.
the readFromPort returns value 0.