Tech Support > Microsoft Windows > Development Resources > Checking Network Computer Status
Checking Network Computer Status
Posted by Belgarath on October 7th, 2003


Hello,

I would like to know if there is a way for me to check wether a
Network path computer is accessible (turned on). Currently if I try to
access a computer that is turned off, my thread hangs for a long time.

Maybe something like resolving a computer name to an IP address, and
try pinging it? This seems clumsy and therefor I wondered if perhaps
something is offered in the windows API.

TIA,
Belgarath

Posted by Sten Westerback on October 7th, 2003


Check out the Net* WINAPI functions. You could
for instance check it with NetWkstaGetInfo().
Notice that on WinNT+ the Net API's are UNICODE
so you if you use ANSI mode you need to do some
MultibyteToWideChar() conversions.

- Sten

"Belgarath" <support@microsoft.com> wrote in message
news:nn05ov4a6rlr6u19f0hgenmu06cmcmdu7f@4ax.com...


Posted by Belgarath on October 7th, 2003


On Tue, 07 Oct 2003 17:14:40 GMT, "Sten Westerback"
<sten.westerback@NO_SPAMnokia.com> wrote:

Thanks a lot!
That sounds like what I need!

Belgarath


Similar Posts