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

C / C++ / MFC

 
GeneralRe: Finding message Pin
cmk8-Apr-06 9:51
cmk8-Apr-06 9:51 
GeneralRe: Finding message Pin
Matt Godbolt8-Apr-06 9:53
Matt Godbolt8-Apr-06 9:53 
GeneralRe: Finding message Pin
cmk8-Apr-06 17:51
cmk8-Apr-06 17:51 
QuestionEnumerating MFU Programs Pin
rajeevktripathi7-Apr-06 19:52
rajeevktripathi7-Apr-06 19:52 
AnswerRe: Enumerating MFU Programs Pin
Hamid_RT7-Apr-06 22:30
Hamid_RT7-Apr-06 22:30 
AnswerRe: Enumerating MFU Programs Pin
Michael Dunn8-Apr-06 12:13
sitebuilderMichael Dunn8-Apr-06 12:13 
QuestionRe: Enumerating MFU Programs Pin
rajeevktripathi9-Apr-06 18:25
rajeevktripathi9-Apr-06 18:25 
QuestionShellExecute problem Pin
QuickDeveloper7-Apr-06 19:46
QuickDeveloper7-Apr-06 19:46 
hi all

I want to check for a valid IP address.the code is as follows

CString strFileName=_T("C:\\Windows\\System32\\Ping.exe");
CString strIpaddress=_T("10.37.8.4");

if(!(int)ShellExecute(NULL,_T("open"), strFileName,strIpaddress,NULL,SW_SHOW) == ERROR_FILE_NOT_FOUND)
{
AfxMessageBox(_T("Successful"));
}
else
{
AfxMessageBox(_T("Ping Failed"));
}

The Problem is that when i execute this it opens the Ping.exe and it checks for valid address but the message box "Successful" is not displayed..instead "Ping Failed" is displayed even after executing Ping exe successfully.

What could be the problem??


Are there any other ways to check for Valid IP address(i.e URL name) like gethostbyname()??

"Every morning I go through Forbes list of 40 richest people in the world. If my name is not in there, I go to work..!!!"



-- modified at 6:17 Saturday 8th April, 2006
AnswerRe: ShellExecute problem Pin
includeh107-Apr-06 20:10
includeh107-Apr-06 20:10 
GeneralRe: ShellExecute problem Pin
QuickDeveloper7-Apr-06 20:24
QuickDeveloper7-Apr-06 20:24 
GeneralRe: ShellExecute problem Pin
Hamid_RT7-Apr-06 21:09
Hamid_RT7-Apr-06 21:09 
GeneralRe: ShellExecute problem Pin
QuickDeveloper7-Apr-06 22:30
QuickDeveloper7-Apr-06 22:30 
GeneralRe: ShellExecute problem Pin
Hamid_RT7-Apr-06 22:50
Hamid_RT7-Apr-06 22:50 
AnswerRe: ShellExecute problem Pin
Matt Godbolt8-Apr-06 1:12
Matt Godbolt8-Apr-06 1:12 
AnswerRe: ShellExecute problem Pin
Michael Dunn8-Apr-06 12:19
sitebuilderMichael Dunn8-Apr-06 12:19 
AnswerRe: ShellExecute problem Pin
Gary R. Wheeler8-Apr-06 12:50
Gary R. Wheeler8-Apr-06 12:50 
Questionabout VSS Pin
FlyWithYou7-Apr-06 19:25
FlyWithYou7-Apr-06 19:25 
Questionsearching files Pin
RabiaAslam7-Apr-06 18:09
RabiaAslam7-Apr-06 18:09 
AnswerRe: searching files Pin
Hamid_RT7-Apr-06 18:45
Hamid_RT7-Apr-06 18:45 
AnswerRe: searching files Pin
Aqueel7-Apr-06 19:10
Aqueel7-Apr-06 19:10 
GeneralRe: searching files Pin
RabiaAslam8-Apr-06 0:00
RabiaAslam8-Apr-06 0:00 
GeneralRe: searching files Pin
Hamid_RT8-Apr-06 1:49
Hamid_RT8-Apr-06 1:49 
AnswerRe: searching files Pin
ThatsAlok7-Apr-06 19:38
ThatsAlok7-Apr-06 19:38 
AnswerRe: searching files Pin
ThatsAlok7-Apr-06 19:40
ThatsAlok7-Apr-06 19:40 
AnswerRe: searching files Pin
Hamid_RT7-Apr-06 19:45
Hamid_RT7-Apr-06 19:45 

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.