PDA

Click to See Complete Forum and Search --> : HOWTO: Determine if Server is ON/OFF before saving files to it?


Thom
Mar 15th, 2001, 02:27 PM
Well I WAS willing to search first-but the search function is disabled! SO...How can I use API calls to help my client-server VB6.0 app determine if the Server is on/running??

The users will need to save their info into files in the App's subdirectory-but I need to make sure the Server is on & running BEFORE the app tries to save-otherwise it will cheerfully tell the user everything worked & end-but nothing gets saved!

So what API calls can I use to have the app check to make sure the server is on before the user saves?
Will GetComputerName, GetComputerNameW or GetSystemPowerStatus work to get the Server's name? But then How do I check for its on/off status? I'd appreciate ANY help-thanks very much!

Thom
Mar 15th, 2001, 04:43 PM
OK, slight change of the question!

I just found out that if the server is turned off a Microsoft Fatal Error is generated for the app's executable, "Problem with MSVBM60.DLL" on the client machine-and the app bombs out!

Is there ANY way to let the app gracefully exit if this occurs? I suspect not, that is if the server dies, the app dies! If anyone has an error trapping suggestion for this I'd appreciate hearing it! Thanks!

thomas