Click here to Skip to main content
15,902,114 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralPrint text by horzontal Pin
El'Cachubrey28-Nov-03 0:36
El'Cachubrey28-Nov-03 0:36 
GeneralRe: Print text by horzontal Pin
Roger Allen28-Nov-03 0:58
Roger Allen28-Nov-03 0:58 
GeneralRe: Print text by horzontal Pin
Shanmuga Sundar28-Nov-03 0:59
Shanmuga Sundar28-Nov-03 0:59 
GeneralChange default codepage Pin
GDavy28-Nov-03 0:14
GDavy28-Nov-03 0:14 
GeneralRe: Change default codepage Pin
Mike Dimmick28-Nov-03 0:29
Mike Dimmick28-Nov-03 0:29 
GeneralRe: Change default codepage Pin
GDavy28-Nov-03 1:01
GDavy28-Nov-03 1:01 
GeneralRe: Change default codepage Pin
Mike Dimmick28-Nov-03 1:13
Mike Dimmick28-Nov-03 1:13 
GeneralHelp needed in using thread and socket Pin
Aswin27-Nov-03 23:34
Aswin27-Nov-03 23:34 
hi
i have developed a server socket program which keeps on sending message. i have created a seperate thread using afxbeginthread(SendMsg,this) (this points to the CSocket derived class). im using carchive. the problem is when the thread tries to send messaage i get a debug assertion error.
i dont know what is the cause of the problem.

UINT SendMS(LPVOID lp)
{
CServerSock* pSock=(CServerSock*)lp;
do
{
pSock->SendStatus();// here i get error

Sleep(1000);
}while(pSock->m_pDlg->m_sta);
return 1;
}


void CServerSock::SendStatus()
{
m_pDlg->Serialize(*m_pArOut);
m_pArOut->Flush();

}

when i press retry i goes to base class

void CAsyncSocket::AssertValid() const
{
CObject::AssertValid();
ASSERT(m_hSocket == INVALID_SOCKET || CAsyncSocket::FromHandle(m_hSocket) != NULL);
}


outside the thread im able to send the message. i would be happy if u can help me with this problem
regards
aswin
GeneralRe: Help needed in using thread and socket Pin
Anonymous28-Nov-03 0:08
Anonymous28-Nov-03 0:08 
GeneralRe: Help needed in using thread and socket Pin
Atif Mushtaq28-Nov-03 2:32
Atif Mushtaq28-Nov-03 2:32 
QuestionHow to create a region from String? Pin
User-37793627-Nov-03 23:12
User-37793627-Nov-03 23:12 
AnswerRe: How to create a region from String? Pin
Iain Clarke, Warrior Programmer28-Nov-03 0:06
Iain Clarke, Warrior Programmer28-Nov-03 0:06 
GeneralRe: How to create a region from String? Pin
User-37793628-Nov-03 0:48
User-37793628-Nov-03 0:48 
GeneralRotate DC Pin
El'Cachubrey27-Nov-03 23:07
El'Cachubrey27-Nov-03 23:07 
GeneralRe: Rotate DC Pin
Iain Clarke, Warrior Programmer28-Nov-03 1:25
Iain Clarke, Warrior Programmer28-Nov-03 1:25 
GeneralRe: Rotate DC Pin
John R. Shaw28-Nov-03 6:32
John R. Shaw28-Nov-03 6:32 
GeneralQuestions: SOUND/THREAD CREATION Pin
DaFrawg27-Nov-03 23:06
DaFrawg27-Nov-03 23:06 
GeneralRe: Questions: SOUND/THREAD CREATION Pin
Bob Stanneveld28-Nov-03 1:59
Bob Stanneveld28-Nov-03 1:59 
GeneralType of Control Pane Pin
Danis Solovyov27-Nov-03 22:33
sussDanis Solovyov27-Nov-03 22:33 
GeneralMFC tray icon Pin
conman11027-Nov-03 22:02
conman11027-Nov-03 22:02 
GeneralRe: MFC tray icon Pin
Iain Clarke, Warrior Programmer28-Nov-03 1:29
Iain Clarke, Warrior Programmer28-Nov-03 1:29 
QuestionIOCP goes wrong? Pin
huqian200227-Nov-03 21:43
huqian200227-Nov-03 21:43 
AnswerRe: IOCP goes wrong? Pin
Anand Paranjpe27-Nov-03 21:49
Anand Paranjpe27-Nov-03 21:49 
GeneralRe: IOCP goes wrong? Pin
huqian200227-Nov-03 22:00
huqian200227-Nov-03 22:00 
AnswerRe: IOCP goes wrong? Pin
geo_m27-Nov-03 22:47
geo_m27-Nov-03 22:47 

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.