Solved

"IsDestinationReachable" on Win9x/Win ME

Posted on 2002-06-21
4
269 Views
Last Modified: 2013-12-04
Has anybody an idea why "IsDestinationReachable" doesn't work on Win9x/Win ME? It just returns FALSE.

MSIE 5.0 is installed on those machines and I'm able to ping the server I pass to "IsDestinationReachable". Also "GetLastError" returns ERROR_SUCCESS.
0
Comment
Question by:searching
  • 2
4 Comments
 

Author Comment

by:searching
ID: 7098311
development environment: an MFC project in MSVC 6.0 SP5/ Win2000 SP2 / Platform SDK November 2001 Edition / MSIE 5.0
0
 
LVL 32

Accepted Solution

by:
jhance earned 200 total points
ID: 7098670
Show your code.  I think you are making a programming error.  I tested this on Win2000, XP, and WinME and it works as expected on all platforms.

My code:

int main(int argc, char* argv[])
{
     QOCINFO mQOC;
     mQOC.dwSize = sizeof(QOCINFO);

     printf("IsDestinationReachable() Test\n\n");

     if(argc < 2){
          printf("usage: ReachableTest <hostname_or_ip>\n");
          return -1;
     }

     if(IsDestinationReachable(argv[1], &mQOC)){
          // Returned TRUE
          printf("IsDestinationReachable() SUCCEEDED.\n");
          printf("\tdwFlags\t\t: 0x%08X\n", mQOC.dwFlags);
          printf("\tdwInSpeed\t: %d\n", mQOC.dwInSpeed);
          printf("\tdwOutSpeed\t: %d\n", mQOC.dwOutSpeed);

     }
     else{
          // Returned FALSE - ERROR
          printf("IsDestinationReachable() failed.  Error is: %d\n", GetLastError());
          return -1;
     }

     return 0;
}

On all Windows platforms I get:

C:\ReachableTest\Release>ReachableTest www.experts-exchange.com

IsDestinationReachable() Test

IsDestinationReachable() SUCCEEDED.
        dwFlags         : 0x00000001
        dwInSpeed       : 100000000
        dwOutSpeed      : 100000000
0
 

Author Comment

by:searching
ID: 7103182
Tnx for pointing this out. I have tested a few things and it seems that "IsDestinationReachable" behaves differently on Win9x <-> Win2000.
Win2000: "http://www.experts-exchange.com" OK
         "www.experts-exchange.com" OK
Win9x: "http://www.experts-exchange.com" NOT OK
       "www.experts-exchange.com" OK

I've also tested "InternetCheckConnection". Do you have any experiences with this function? It crashes or returns FALSE on platforms with WinInet.dll 5.00.26xx.xx or lower.
Any suggestions?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Run Program using VBScript 3 58
Application vs Workbook.applicaiton 3 33
T-SQL Debugging - Temp Object Content 2 52
WPF issue with Trigger 2 96
With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now