Click to See Complete Forum and Search --> : cancel network connections


a22catcher
October 16th, 2005, 08:18 AM
Hi,
I tried to cancel network connections using WNetCacnelConnection2.
The problem is, that I don't know how to cancel all of the connections
(I don't know their names in advance).
Can somebody help?

Thanks

wildfrog
October 16th, 2005, 08:31 AM
You can use WNetOpenEnum(...) and WNetEnumResource(...) to enumerate nettwork connections and resources.

- petter

a22catcher
October 16th, 2005, 12:18 PM
Thanks for your reply.

I tried doing it , but failed.
I used the example here -
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wnet/wnet/enumerating_network_resources.asp
But I have a few problems -
How do I find the actual devices ("a:, b:..")?
It finds many "RESOURCEUSAGE_connectable" whose local names are
unaccessable.

Any idea?
thanks

a22catcher
October 19th, 2005, 02:49 AM
Anyone?