Thread in DLL
-
Yes, you can. i do this all the time. I use a thread pool created in a dll in my main application. John
-
Yes, you can. i do this all the time. I use a thread pool created in a dll in my main application. John
Hello John I am creating a Win32DLL in which i am passing the address of a function like extern "C" __declspec(dllexport) BOOL ReadCard(char *pData) { if(g_hPort == NULL) { strcpy(pData,"COM port is not opened"); return false; } g_hThreadRead = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)MyMSR_PortReadThreadMgr, 0, 0,&dwThreadID); return true; } But this thread is created but not executing the functions. I have declared the function like DWORD WINAPI MyMSR_PortReadThreadMgr(LPVOID param) { } But it is not going to this function can you suggest me some thing Thanks in advance Shailesh CeateThread(
-
Hello John I am creating a Win32DLL in which i am passing the address of a function like extern "C" __declspec(dllexport) BOOL ReadCard(char *pData) { if(g_hPort == NULL) { strcpy(pData,"COM port is not opened"); return false; } g_hThreadRead = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)MyMSR_PortReadThreadMgr, 0, 0,&dwThreadID); return true; } But this thread is created but not executing the functions. I have declared the function like DWORD WINAPI MyMSR_PortReadThreadMgr(LPVOID param) { } But it is not going to this function can you suggest me some thing Thanks in advance Shailesh CeateThread(
aman2006 wrote: But this thread is created How did you check this? aman2006 wrote: But it is not going to this function And this ? Code seems fine to me.. Bikram Singh I believe we should all pay our tax with a smile. I tried - but they wanted cash.