Click here to Skip to main content
15,885,985 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to visually click the radio button in propertypage. Pin
David Crow17-Sep-09 16:40
David Crow17-Sep-09 16:40 
GeneralRe: How to visually click the radio button in propertypage. Pin
DevelopmentNoob17-Sep-09 16:53
DevelopmentNoob17-Sep-09 16:53 
AnswerRe: How to visually click the radio button in propertypage. Pin
vasu_sri17-Sep-09 19:23
vasu_sri17-Sep-09 19:23 
GeneralRe: How to visually click the radio button in propertypage. Pin
vasu_sri17-Sep-09 19:27
vasu_sri17-Sep-09 19:27 
QuestionMS09-035 Zero Day bug Pin
fredsparkle17-Sep-09 11:29
fredsparkle17-Sep-09 11:29 
AnswerRe: MS09-035 Zero Day bug Pin
Randor 17-Sep-09 12:33
professional Randor 17-Sep-09 12:33 
AnswerRe: MS09-035 Zero Day bug Pin
Joe Woodbury17-Sep-09 17:39
professionalJoe Woodbury17-Sep-09 17:39 
QuestionRFC 868 [solved] Pin
David Crow17-Sep-09 10:38
David Crow17-Sep-09 10:38 
I was playing around with a small piece of code that queries port 37 on host 129.6.15.28 to get the date and time. It consistently gives me back 3435973836. Doing the conversion, that's roughly 108.8 years after January 1, 1900 (the epoch). For today, I would have expected a number close to 3461794781. Questions: 1) why would I keep getting the same number, and 2) why is it not the right number?

// error checking has been omitted for brevity
SOCKET rSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
  
unsigned long ul = 1;
ioctlsocket(rSocket, FIONBIO, &ul);
  
SOCKADDR_IN rSocketAddr;
rSocketAddr.sin_family      = AF_INET;
rSocketAddr.sin_addr.s_addr = inet_addr("129.6.15.28");
rSocketAddr.sin_port        = htons(37);
  
connect(rSocket, (LPSOCKADDR) &rSocketAddr, sizeof(rSocketAddr));
  
unsigned int nData = 0;
recv(rSocket, (char *) &nData, sizeof(nData), 0); // returns 4 bytes read
TRACE("%u\n", nData);
Update: initializing nData to 0 answers the questions as to why recv() was consistently assigning 3435973836 to nData. After a few more rounds of testing, the culprit looks to be the call to ioctlsocket() which made the socket non-blocking.

"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons


AnswerRe: RFC 868 Pin
CPallini17-Sep-09 10:57
mveCPallini17-Sep-09 10:57 
GeneralRe: RFC 868 Pin
David Crow17-Sep-09 11:01
David Crow17-Sep-09 11:01 
GeneralRe: RFC 868 Pin
CPallini17-Sep-09 11:04
mveCPallini17-Sep-09 11:04 
GeneralRe: RFC 868 Pin
David Crow17-Sep-09 16:31
David Crow17-Sep-09 16:31 
GeneralRe: RFC 868 Pin
CPallini17-Sep-09 20:38
mveCPallini17-Sep-09 20:38 
GeneralRe: RFC 868 Pin
David Crow18-Sep-09 2:30
David Crow18-Sep-09 2:30 
AnswerRe: RFC 868 Pin
Stuart Dootson17-Sep-09 11:05
professionalStuart Dootson17-Sep-09 11:05 
AnswerRe: RFC 868 Pin
Stuart Dootson17-Sep-09 13:45
professionalStuart Dootson17-Sep-09 13:45 
GeneralRe: RFC 868 Pin
David Crow17-Sep-09 16:30
David Crow17-Sep-09 16:30 
GeneralRe: RFC 868 Pin
Joe Woodbury17-Sep-09 17:40
professionalJoe Woodbury17-Sep-09 17:40 
GeneralRe: RFC 868 Pin
Stuart Dootson17-Sep-09 20:59
professionalStuart Dootson17-Sep-09 20:59 
GeneralRe: RFC 868 Pin
David Crow18-Sep-09 2:28
David Crow18-Sep-09 2:28 
QuestionRe: RFC 868 [solved] [modified] Pin
CPallini18-Sep-09 9:42
mveCPallini18-Sep-09 9:42 
AnswerRe: RFC 868 [solved] Pin
David Crow18-Sep-09 9:47
David Crow18-Sep-09 9:47 
GeneralRe: RFC 868 [solved] Pin
CPallini18-Sep-09 10:37
mveCPallini18-Sep-09 10:37 
QuestionRe: RFC 868 [solved] Pin
David Crow21-Sep-09 4:05
David Crow21-Sep-09 4:05 
QuestionConvert Julian date/time to Normal date/time? Pin
dipuks17-Sep-09 9:53
dipuks17-Sep-09 9:53 

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.