Click here to Skip to main content
15,892,537 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Live Redirection Pin
Owner drawn16-Oct-06 19:28
Owner drawn16-Oct-06 19:28 
GeneralRe: Live Redirection Pin
rupert_durans16-Oct-06 22:00
rupert_durans16-Oct-06 22:00 
QuestionDll Loading Visual Studio 6.0 VC++ Pin
ccp99916-Oct-06 14:30
ccp99916-Oct-06 14:30 
AnswerRe: Dll Loading Visual Studio 6.0 VC++ Pin
prasad_som16-Oct-06 19:45
prasad_som16-Oct-06 19:45 
Questioncreating a thread Pin
xJorDyx16-Oct-06 10:21
xJorDyx16-Oct-06 10:21 
AnswerRe: creating a thread Pin
Mark Salsbery16-Oct-06 10:36
Mark Salsbery16-Oct-06 10:36 
GeneralRe: creating a thread Pin
xJorDyx18-Oct-06 11:51
xJorDyx18-Oct-06 11:51 
GeneralRe: creating a thread Pin
Mark Salsbery18-Oct-06 12:03
Mark Salsbery18-Oct-06 12:03 
You want to pass the SOCKET to the thread procedure correct?

Declare your class-member thread procedure as

static DWORD WINAPI listener(LPVOID lpParam);

Write the function something like this:

DWORD WINAPI myclass::listener(LPVOID lpParam)
{
	SOCKET s = (SOCKET)lpParam;

	... do stuff with the socket...

	return 0;//
}

Create the thread something like:

HANDLE Handle_Of_listener_thread = 0;
Handle_Of_listener_thread = CreateThread( NULL, 0, listener, (LPVOID)s, 0, NULL);

Better?

Mark
GeneralRe: creating a thread [modified] Pin
xJorDyx19-Oct-06 9:08
xJorDyx19-Oct-06 9:08 
GeneralRe: creating a thread Pin
xJorDyx24-Oct-06 7:13
xJorDyx24-Oct-06 7:13 
QuestionImage Pin
messages16-Oct-06 8:52
messages16-Oct-06 8:52 
AnswerRe: Image Pin
Mark Salsbery16-Oct-06 9:01
Mark Salsbery16-Oct-06 9:01 
GeneralRe: Image Pin
messages16-Oct-06 9:25
messages16-Oct-06 9:25 
GeneralRe: Image Pin
Mark Salsbery16-Oct-06 9:38
Mark Salsbery16-Oct-06 9:38 
AnswerRe: Image Pin
viliam16-Oct-06 9:03
viliam16-Oct-06 9:03 
GeneralRe: Image Pin
messages16-Oct-06 9:26
messages16-Oct-06 9:26 
GeneralRe: Image Pin
Christian Graus16-Oct-06 10:10
protectorChristian Graus16-Oct-06 10:10 
Questionredirect input Pin
viliam16-Oct-06 8:38
viliam16-Oct-06 8:38 
AnswerRe: redirect input Pin
rupert_durans16-Oct-06 22:56
rupert_durans16-Oct-06 22:56 
AnswerRe: redirect input Pin
David Crow17-Oct-06 5:17
David Crow17-Oct-06 5:17 
QuestionC++ Winsock/Network Programming Help Please Pin
Phoenix10116-Oct-06 8:24
Phoenix10116-Oct-06 8:24 
AnswerRe: C++ Winsock/Network Programming Help Please Pin
Mark Salsbery16-Oct-06 8:39
Mark Salsbery16-Oct-06 8:39 
AnswerRe: C++ Winsock/Network Programming Help Please Pin
Zac Howland16-Oct-06 8:40
Zac Howland16-Oct-06 8:40 
AnswerRe: C++ Winsock/Network Programming Help Please Pin
normanS16-Oct-06 9:49
normanS16-Oct-06 9:49 
AnswerRe: C++ Winsock/Network Programming Help Please Pin
ThatsAlok16-Oct-06 18:48
ThatsAlok16-Oct-06 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.