Click here to Skip to main content
15,896,726 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralAbout Focus. Pin
Zero_One_ADO5-Aug-04 18:40
Zero_One_ADO5-Aug-04 18:40 
GeneralRe: About Focus. Pin
ThatsAlok5-Aug-04 21:39
ThatsAlok5-Aug-04 21:39 
GeneralDrag n Drop a file Pin
zahid_ash5-Aug-04 18:27
zahid_ash5-Aug-04 18:27 
GeneralStrange screen resolution problem Pin
Stan the man5-Aug-04 16:25
Stan the man5-Aug-04 16:25 
GeneralRe: Strange screen resolution problem Pin
Christian Graus5-Aug-04 16:44
protectorChristian Graus5-Aug-04 16:44 
GeneralRe: Strange screen resolution problem Pin
Stan the man5-Aug-04 18:16
Stan the man5-Aug-04 18:16 
GeneralRe: Strange screen resolution problem Pin
Ryan Binns5-Aug-04 20:25
Ryan Binns5-Aug-04 20:25 
GeneralCreating Thread in DLL Pin
aman20065-Aug-04 14:57
aman20065-Aug-04 14:57 
Hi
I am writing a Regular DLL in which i am creating a Thread by using the function

extern "C" __declspec(dllexport) BOOL ReadCard(char *pData)
{


if(l_hPort == NULL)
{
strcpy(pData,"COM port is null");
return FALSE;
}

memset(g_strResult,0x00,500);

//PrepareThread(pData);
g_hThreadRead = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) MyMSR_PortReadThreadMgr,(LPVOID)&pData, 0,&dwThreadID);

}

I have declared the function at the top but when i call this DLL from some other application it is working fine but it is not going to the function i have in CreateThread means it is not going on the function MyMSR_PortReadThreadMgr();

Please tell me whats wrong with this.

I have created the project using Regular DlL in which i have inserted one file PrintPad.cpp and PrintPad.h in which i am writing these functions.


My Function is as:
static UINT MyMSR_PortReadThreadMgr(LPVOID pData)
{
BOOL bSuccess = TRUE;
while(1)
{
if ( l_bTaskAbort )
{
Disconnect();
return(FALSE);
}
// if the card is removed then read the data
if( !GetCardData())
{
strcpy((char*)pData,"No Data Received");
Rs232CleanUp(FALSE);
return FALSE;
}

if(strncmp(g_strResult,"{N}",3) == 0)
{
//strcpy(pData,"No Data Received.");
Rs232CleanUp(FALSE);
return FALSE;
}

if(strstr(g_strResult, "T1:B") || strstr(g_strResult, "T2:B") || strstr(g_strResult, "T3:B"))
{
// strcpy(pData,"bad track Read");
Rs232CleanUp(FALSE);
return FALSE;
}




}// end of while

return bSuccess;
}

GeneralRe: Creating Thread in DLL Pin
oustar5-Aug-04 16:21
oustar5-Aug-04 16:21 
GeneralRe: Creating Thread in DLL Pin
aman20066-Aug-04 6:46
aman20066-Aug-04 6:46 
GeneralPicture control question Pin
ben25-Aug-04 13:12
ben25-Aug-04 13:12 
GeneralRe: Picture control question Pin
oustar5-Aug-04 16:41
oustar5-Aug-04 16:41 
GeneralRe: Picture control question Pin
Ryan Binns5-Aug-04 18:09
Ryan Binns5-Aug-04 18:09 
GeneralCreate a MSFlexGrid within my ActiveX Control Pin
Pinhead_Me5-Aug-04 12:08
Pinhead_Me5-Aug-04 12:08 
QuestionCan Tcp/Ip "Accept() " Be Made "Non Blocking" Pin
jerry1211a5-Aug-04 12:02
jerry1211a5-Aug-04 12:02 
AnswerRe: Can Tcp/Ip "Accept() " Be Made "Non Blocking" Pin
Ravi Bhavnani5-Aug-04 13:58
professionalRavi Bhavnani5-Aug-04 13:58 
GeneralRe: Can Tcp/Ip "Accept() " Be Made "Non Blocking" Pin
Ryan Binns5-Aug-04 18:33
Ryan Binns5-Aug-04 18:33 
GeneralRe: Can Tcp/Ip "Accept() " Be Made "Non Blocking" Pin
Ravi Bhavnani6-Aug-04 2:51
professionalRavi Bhavnani6-Aug-04 2:51 
AnswerRe: Can Tcp/Ip "Accept() " Be Made "Non Blocking" Pin
Rickard Andersson205-Aug-04 15:38
Rickard Andersson205-Aug-04 15:38 
AnswerRe: Can Tcp/Ip "Accept() " Be Made "Non Blocking" Pin
palbano5-Aug-04 19:08
palbano5-Aug-04 19:08 
AnswerRe: Can Tcp/Ip "Accept() " Be Made "Non Blocking" Pin
geo_m5-Aug-04 22:24
geo_m5-Aug-04 22:24 
QuestionCorrect ReBar/ToolBar/DialogBar functionality? Pin
JBlair5-Aug-04 10:41
JBlair5-Aug-04 10:41 
QuestionHow to send kb/mouse message to an un-active "Notepad"? Pin
Member 6253945-Aug-04 10:25
Member 6253945-Aug-04 10:25 
GeneralConnecting to multiple servers thru single port client connection Pin
Sivaji5-Aug-04 9:26
Sivaji5-Aug-04 9:26 
GeneralRe: Connecting to multiple servers thru single port client connection Pin
palbano5-Aug-04 19:13
palbano5-Aug-04 19:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.