Click here to Skip to main content
15,911,715 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Trapping keystrokes... Pin
Rickard Andersson2030-Sep-03 20:53
Rickard Andersson2030-Sep-03 20:53 
GeneralOne way works other doesn't Pin
esepich29-Sep-03 16:36
esepich29-Sep-03 16:36 
The part under the (if aorh == 0) works great Smile | :) . The part in the else{} brackets dosn't and causes a fatal error in my program when I run it as well as a WSAEPROTONOSUPPORT error Frown | :( I don't understand. I must be doing something screwy.

void CSSPingDlg::Ping(LPCSTR pstrHost, int aorh)
{
SOCKET rawSocket;
LPHOSTENT lpHost;

rawSocket = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP);
if (rawSocket == SOCKET_ERROR)
{
AfxMessageBox("Raw socket initialization failed.",MB_OK);
return;
}
if (aorh == 0)
{
lpHost = gethostbyname(pstrHost);
saDest.sin_addr.s_addr = *((u_long FAR *) (lpHost->h_addr));
saDest.sin_family = AF_INET;
saDest.sin_port = 0;

}
else
{
lpHost = gethostbyaddr(pstrHost,4,AF_INET);
saDest.sin_addr.s_addr = *((u_long FAR *) (lpHost->h_addr));
saDest.sin_family = AF_INET;
saDest.sin_port = 0;
}
GeneralRe: One way works other doesn't Pin
KarstenK29-Sep-03 21:57
mveKarstenK29-Sep-03 21:57 
GeneralRe: One way works other doesn't Pin
David Crow30-Sep-03 3:05
David Crow30-Sep-03 3:05 
GeneralRe: One way works other doesn't Pin
KarstenK30-Sep-03 3:42
mveKarstenK30-Sep-03 3:42 
GeneralRe: One way works other doesn't Pin
David Crow30-Sep-03 3:22
David Crow30-Sep-03 3:22 
GeneralFrustration levels mounting. Pin
73Zeppelin29-Sep-03 15:27
73Zeppelin29-Sep-03 15:27 
GeneralRe: Frustration levels mounting. Pin
Dave Bryant29-Sep-03 15:35
Dave Bryant29-Sep-03 15:35 
GeneralRe: Frustration levels mounting. (LARGE) Pin
Dave Bryant29-Sep-03 15:57
Dave Bryant29-Sep-03 15:57 
GeneralRe: Frustration levels mounting. (LARGE) Pin
73Zeppelin29-Sep-03 16:03
73Zeppelin29-Sep-03 16:03 
GeneralRe: Frustration levels mounting. (LARGE) Pin
Jim Crafton29-Sep-03 17:56
Jim Crafton29-Sep-03 17:56 
QuestionTo any Microsoft lurkers: MFC Enhancements? Pin
Joe Woodbury29-Sep-03 15:24
professionalJoe Woodbury29-Sep-03 15:24 
AnswerRe: To any Microsoft lurkers: MFC Enhancements? Pin
Jim Crafton29-Sep-03 18:02
Jim Crafton29-Sep-03 18:02 
GeneralRe: To any Microsoft lurkers: MFC Enhancements? Pin
Joe Woodbury29-Sep-03 18:14
professionalJoe Woodbury29-Sep-03 18:14 
GeneralRe: To any Microsoft lurkers: MFC Enhancements? Pin
Jim Crafton29-Sep-03 18:25
Jim Crafton29-Sep-03 18:25 
GeneralRe: To any Microsoft lurkers: MFC Enhancements? Pin
Joe Woodbury29-Sep-03 18:56
professionalJoe Woodbury29-Sep-03 18:56 
AnswerRe: To any Microsoft lurkers: MFC Enhancements? Pin
Anonymous29-Sep-03 21:15
Anonymous29-Sep-03 21:15 
GeneralRe: To any Microsoft lurkers: MFC Enhancements? Pin
Joe Woodbury30-Sep-03 4:50
professionalJoe Woodbury30-Sep-03 4:50 
AnswerRe: To any Microsoft lurkers: MFC Enhancements? Pin
jhwurmbach29-Sep-03 21:53
jhwurmbach29-Sep-03 21:53 
GeneralRe: To any Microsoft lurkers: MFC Enhancements? Pin
Joe Woodbury30-Sep-03 4:35
professionalJoe Woodbury30-Sep-03 4:35 
AnswerRe: To any Microsoft lurkers: MFC Enhancements? Pin
Neville Franks30-Sep-03 1:23
Neville Franks30-Sep-03 1:23 
GeneralRe: To any Microsoft lurkers: MFC Enhancements? Pin
Joe Woodbury30-Sep-03 4:47
professionalJoe Woodbury30-Sep-03 4:47 
GeneralLinked List Question Pin
Abin29-Sep-03 14:15
Abin29-Sep-03 14:15 
GeneralRe: Linked List Question Pin
Navin29-Sep-03 14:42
Navin29-Sep-03 14:42 
GeneralRe: Linked List Question Pin
Dave Bryant29-Sep-03 15:15
Dave Bryant29-Sep-03 15:15 

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.