Click here to Skip to main content
15,899,604 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionGetDIBits Problem need help!!! Pin
viva_neu25-Aug-05 22:35
viva_neu25-Aug-05 22:35 
AnswerRe: GetDIBits Problem need help!!! Pin
Anonymous26-Aug-05 2:48
Anonymous26-Aug-05 2:48 
AnswerRe: GetDIBits Problem need help!!! Pin
John R. Shaw27-Aug-05 12:18
John R. Shaw27-Aug-05 12:18 
GeneralRe: GetDIBits Problem need help!!! Pin
viva_neu28-Aug-05 14:46
viva_neu28-Aug-05 14:46 
GeneralRe: GetDIBits Problem need help!!! Pin
John R. Shaw28-Aug-05 22:19
John R. Shaw28-Aug-05 22:19 
GeneralRe: GetDIBits Problem need help!!! Pin
viva_neu28-Aug-05 22:26
viva_neu28-Aug-05 22:26 
GeneralRe: GetDIBits Problem need help!!! Pin
John R. Shaw28-Aug-05 23:04
John R. Shaw28-Aug-05 23:04 
QuestionCSocket Pin
sunit525-Aug-05 22:07
sunit525-Aug-05 22:07 
I m coding my server socket using CSocket.Everything goes right till the Accept (function of CSocket) is called.it shows Debug Assertion failed in File:sockcore.cpp

here is my code

BOOL CCSocketDlg::OnInitDialog()
{...
//AfxSocketInit() has been called
//CCSocketApp::InitInstance()
//default constructor creates TCP/IP so it is SOCK_STREAM
//this function will also binds the the socket with one //network card

BOOL bsocketcreate= socket.Create(36545);//create the //socket which will listen at port 36545

//if the socket is not created
if(!bsocketcreate)
{
::OutputDebugString(_T("socket couldnot be created"));
return FALSE;
}
else
::OutputDebugString(_T("socket created successfully"));


//SOCKET created then start listen socket
BOOL bsocketlisten= socket.Listen(5);

//if the socket is not able to listen at specified port
if(!bsocketlisten)
{
::OutputDebugString(_T("socket couldnot listen on specified port"));
return FALSE;
}
else
::OutputDebugString(_T("socket listens at specified port"));

// Begin the Socket thread
AfxBeginThread(fnMainThread,LPVOID(this));

return TRUE; // return TRUE unless you set the focus to a control
}

UINT fnMainThread(LPVOID p)
{
CCSocketDlg *m_Dlg=(CCSocketDlg*)p;

//create another CSocket variable to accept the connection
CSocket sockConnection;

//socket is listening it can know accept new connection
BOOL bsocketaccept=m_Dlg->socket.Accept(sockConnection);

if(!bsocketaccept)//if the connection with client is not //establish
{
::AfxMessageBox(_T("socket couldnot establish new connection with client"));
AfxEndThread(0);//end thread
return 1;
}
::OutputDebugString(_T("connection accepted on new socket"));
//Begin a new Socket thread AfxBeginThread(fnMainThread,LPVOID(p));
m_Dlg->socket.Close();
return 0;
}

thanx for help


-- modified at 4:10 Friday 26th August, 2005
AnswerRe: CSocket Pin
dharani25-Aug-05 22:22
dharani25-Aug-05 22:22 
GeneralRe: CSocket Pin
sunit525-Aug-05 22:47
sunit525-Aug-05 22:47 
GeneralRe: CSocket Pin
sunit526-Aug-05 0:08
sunit526-Aug-05 0:08 
AnswerRe: CSocket Pin
MailtoGops26-Aug-05 3:05
MailtoGops26-Aug-05 3:05 
GeneralRe: CSocket Pin
sunit526-Aug-05 3:41
sunit526-Aug-05 3:41 
GeneralRe: CSocket Pin
MailtoGops26-Aug-05 3:52
MailtoGops26-Aug-05 3:52 
GeneralRe: CSocket Pin
sunit526-Aug-05 4:17
sunit526-Aug-05 4:17 
AnswerRe: CSocket Pin
Moak (not logged in)27-Aug-05 22:27
sussMoak (not logged in)27-Aug-05 22:27 
QuestionExcel Automation Pin
Identity Undisclosed25-Aug-05 21:52
Identity Undisclosed25-Aug-05 21:52 
AnswerRe: Excel Automation Pin
Steve S25-Aug-05 23:44
Steve S25-Aug-05 23:44 
AnswerRe: Excel Automation Pin
Rage26-Aug-05 0:33
professionalRage26-Aug-05 0:33 
QuestionHow to Hide WindowName and Rectangle From Taskbar Pin
Amarelia25-Aug-05 20:55
Amarelia25-Aug-05 20:55 
AnswerRe: How to Hide WindowName and Rectangle From Taskbar Pin
dharani25-Aug-05 22:26
dharani25-Aug-05 22:26 
GeneralRe: How to Hide WindowName and Rectangle From Taskbar Pin
Amarelia26-Aug-05 2:57
Amarelia26-Aug-05 2:57 
QuestionCan you tell me how can I control speeds of IIS. Pin
10244225-Aug-05 20:09
10244225-Aug-05 20:09 
QuestionHiding characters in text file Pin
m_shezy25-Aug-05 19:35
m_shezy25-Aug-05 19:35 
QuestionAbout CMonthCalCtrl : Plz Help. Pin
parims25-Aug-05 18:48
parims25-Aug-05 18:48 

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.