Click here to Skip to main content
15,913,944 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Owner Drawn CHeaderCtrl Items Pin
Uller16-Oct-03 2:21
Uller16-Oct-03 2:21 
GeneralRe: Owner Drawn CHeaderCtrl Items Pin
Roger Allen16-Oct-03 5:25
Roger Allen16-Oct-03 5:25 
GeneralRe: Owner Drawn CHeaderCtrl Items Pin
Uller16-Oct-03 7:33
Uller16-Oct-03 7:33 
GeneralImage resolution.. Pin
Neha16-Oct-03 1:42
Neha16-Oct-03 1:42 
Generalinfix to postfix Pin
16-Oct-03 0:45
suss16-Oct-03 0:45 
QuestionHow to draw selection with different color?? Pin
Umesh Sharma16-Oct-03 0:42
Umesh Sharma16-Oct-03 0:42 
QuestionHow to make .ACS(agent character storage) Pin
sunju16-Oct-03 0:34
sunju16-Oct-03 0:34 
GeneralUnexpected Win32 Thread when using sockets Pin
Niklas Andersson15-Oct-03 23:30
Niklas Andersson15-Oct-03 23:30 
I'm quite confused!

Writing a simple win32 console application using sockets, I get an unexpected "Win32 Thread" in my application.

The following sample application has two thread (the main thread, and the unexpected win32 thread".

Has anyone noticed this, and what is this extra thread used for?


#include "winsock2.h"<br />
<br />
void main()<br />
{<br />
    WSADATA info;<br />
    <br />
    if(WSAStartup(MAKEWORD( 2, 0 ),&info))<br />
	    return;<br />
<br />
  	char name[1000];<br />
	int len=1000;<br />
<br />
	gethostname(name,len); // this call spawns an extra thread<br />
<br />
    Sleep(10000);<br />
	<br />
    WSACleanup();<br />
}


PS: I link to ws2_32.lib




// Niklas
GeneralRe: Unexpected Win32 Thread when using sockets Pin
cmk16-Oct-03 9:20
cmk16-Oct-03 9:20 
GeneralRemoveDirectory - help Pin
Boby.George15-Oct-03 23:08
professionalBoby.George15-Oct-03 23:08 
GeneralRe: RemoveDirectory - help Pin
murali_utr16-Oct-03 0:33
murali_utr16-Oct-03 0:33 
GeneralRe: re you? Pin
jhwurmbach15-Oct-03 22:55
jhwurmbach15-Oct-03 22:55 
QuestionClass Problem? Pin
wow999915-Oct-03 21:43
wow999915-Oct-03 21:43 
AnswerRe: Class Problem? Pin
souldog15-Oct-03 22:26
souldog15-Oct-03 22:26 
QuestionHow catch a button in the system taskbar?online wait! Pin
Paristam15-Oct-03 21:14
Paristam15-Oct-03 21:14 
QuestionHow do I programatically add a RAS direct connection via COM5, not just only start the wizard ? Pin
Thomas Rinshofer15-Oct-03 21:13
Thomas Rinshofer15-Oct-03 21:13 
GeneralHelp me!Very hurry! Pin
Paristam15-Oct-03 20:14
Paristam15-Oct-03 20:14 
GeneralRe: Help me!Very hurry! Pin
Randhir Sinha15-Oct-03 21:01
Randhir Sinha15-Oct-03 21:01 
GeneralRe: RemoveDirectory() not working in Win2000 Pin
J. Dunlap15-Oct-03 20:27
J. Dunlap15-Oct-03 20:27 
GeneralRe: RemoveDirectory() not working in Win2000 Pin
Randhir Sinha16-Oct-03 2:19
Randhir Sinha16-Oct-03 2:19 
GeneralSocket problem here Pin
Cyberizen15-Oct-03 20:01
Cyberizen15-Oct-03 20:01 
GeneralRe: Socket problem here Pin
jmkhael15-Oct-03 22:33
jmkhael15-Oct-03 22:33 
Generalarabic support Pin
Anonymous15-Oct-03 19:40
Anonymous15-Oct-03 19:40 
GeneralLinker errors on Unicode version of BCGSoft library Pin
Uwe Keim15-Oct-03 19:39
sitebuilderUwe Keim15-Oct-03 19:39 
GeneralRe: Linker errors on Unicode version of BCGSoft library Pin
sexywetdeath17-Oct-03 2:34
sexywetdeath17-Oct-03 2:34 

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.