Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pass Vfp Object to a DCOM server ?
Message
From
02/08/2000 17:01:59
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00399459
Message ID:
00400077
Views:
17
>Ok Thank's
>
>I Try to Valid a ComputerName before used it in my { CreateObjectEx } because if the server is down it will take few minute before return the control to Fox.
>
>Do you know if exist a API Function or something else that can do that king of Stuff ?
>

You can take a look at my NETRESOURCE class in the Files section; there's code there that can iterate and find available network resources. You could also try to use WNetAddConnection3() to attemt to attach the IPC$ resource to the remore server; if that isn't present, you aren't going to be able to use COM to connect to it. THere's sample code for iterating the netowrk resources and implementing WNetAddConnection3() in the class; ypou'll also need CLSHEAP to use it.

>Ex:
>
>IF ??? \\MyServer && need Fast Answer
> x = CreateObjectEx("MyDcomServer.Main","\\MyServer")
>ENDIF
>
>Rock
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform