Click here to Skip to main content
15,891,136 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: HOW TO get length of BYTE variable in C++ Pin
kcynic4-Nov-07 16:47
kcynic4-Nov-07 16:47 
GeneralRe: HOW TO get length of BYTE variable in C++ Pin
James R. Twine5-Nov-07 1:41
James R. Twine5-Nov-07 1:41 
GeneralRe: HOW TO get length of BYTE variable in C++ Pin
kcynic5-Nov-07 14:06
kcynic5-Nov-07 14:06 
AnswerRe: HOW TO get length of BYTE variable in C++ Pin
cmk4-Nov-07 18:28
cmk4-Nov-07 18:28 
QuestionSocket ptogramming Pin
Amjath Rahman4-Nov-07 14:34
Amjath Rahman4-Nov-07 14:34 
AnswerRe: Socket ptogramming Pin
Llasus4-Nov-07 14:41
Llasus4-Nov-07 14:41 
GeneralRe: Socket ptogramming Pin
Amjath Rahman4-Nov-07 15:38
Amjath Rahman4-Nov-07 15:38 
GeneralRe: Socket ptogramming Pin
Llasus4-Nov-07 15:53
Llasus4-Nov-07 15:53 
Here's a somewhat sample code to pass the SOCKET to a thread. Hope this helps.

<br />
CAsyncSocket ListenSocket; //global socket variable, declare this in the header file<br />
<br />
BOOL CClassSample::Initialize()<br />
{<br />
//initialize the pipe variable<br />
<br />
//create the thread<br />
HListenThread = CreateThread(NULL,<br />
			0,<br />
			&ListenThread,<br />
			(LPVOID)&ListenSocket,<br />
			0,<br />
			&ListenThreadID<br />
			);<br />
//Error handling for CreateThread<br />
if (HListenThread == NULL || HListenThread == INVALID_HANDLE_VALUE)<br />
{<br />
	return FALSE;<br />
}<br />
}<br />
<br />
DWORD WINAPI CClassSample::ListenThread(LPVOID lpParameter)<br />
{<br />
//assign the parameter to the SOCKET variable<br />
CAsyncSocket *pListenSocket = (CAsyncSocket*)lpParameter;<br />
//some processing here<br />
}<br />

GeneralRe: Socket ptogramming Pin
Amjath Rahman4-Nov-07 16:01
Amjath Rahman4-Nov-07 16:01 
QuestionRe: Socket ptogramming Pin
David Crow4-Nov-07 16:19
David Crow4-Nov-07 16:19 
GeneralRe: Socket ptogramming Pin
Llasus4-Nov-07 16:48
Llasus4-Nov-07 16:48 
QuestionA question about exit codes Pin
Llasus4-Nov-07 14:08
Llasus4-Nov-07 14:08 
QuestionFtpPutFile problem Pin
dellthinker4-Nov-07 10:16
dellthinker4-Nov-07 10:16 
AnswerRe: FtpPutFile problem Pin
Peter Weyzen4-Nov-07 13:13
Peter Weyzen4-Nov-07 13:13 
QuestionRe: FtpPutFile problem Pin
David Crow4-Nov-07 16:20
David Crow4-Nov-07 16:20 
AnswerRe: FtpPutFile problem Pin
dellthinker4-Nov-07 17:48
dellthinker4-Nov-07 17:48 
GeneralRe: FtpPutFile problem Pin
vijay_aroli5-Nov-07 0:29
vijay_aroli5-Nov-07 0:29 
GeneralRe: FtpPutFile problem Pin
dellthinker5-Nov-07 3:07
dellthinker5-Nov-07 3:07 
QuestionRe: FtpPutFile problem Pin
David Crow5-Nov-07 3:40
David Crow5-Nov-07 3:40 
AnswerRe: FtpPutFile problem Pin
dellthinker5-Nov-07 5:01
dellthinker5-Nov-07 5:01 
QuestionDebugging Functions Pin
Richard Andrew x644-Nov-07 8:56
professionalRichard Andrew x644-Nov-07 8:56 
QuestionHide Window before it's creation Pin
vikrant kpr4-Nov-07 6:59
vikrant kpr4-Nov-07 6:59 
AnswerRe: Hide Window before it's creation Pin
Peter Weyzen4-Nov-07 7:19
Peter Weyzen4-Nov-07 7:19 
AnswerRe: Hide Window before it's creation Pin
Neo Andreson4-Nov-07 15:43
Neo Andreson4-Nov-07 15:43 
Questioncalling .net dll from vs6 c++ Pin
BoscoBill4-Nov-07 6:28
BoscoBill4-Nov-07 6:28 

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.