🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages Started by Jeff Mon, 12 Jun 2006 22:32
Disconnect Mapped Drive
#3460
Author: Jeff
Date: Mon, 12 Jun 2006 22:32
8 lines
1078 bytes
I'm trying to disconnect a mapped network drive using the code below.  It 
returns 0 (NO_ERROR), but the drive is still mapped?

 intReturn = WNetCancelConnection2("G:", 0, true);

Any thoughts?

Jeff 
Re: Disconnect Mapped Drive
#3462
Author: Mike Collins
Date: Tue, 13 Jun 2006 08:27
21 lines
1698 bytes
Just as a "stab in the dark" - did you make the original connection your 
self, in code, with a call to WNetAddConnection2?  As for as I know a 
connaction can only be disconnected from the same account as it was made.

Also, have a look at the second parameter passed, dwFlag.  You are passing 0 
which indicated that the system does not get updated about the connection 
status, you might want to try changing this to NECT_UPDATE_PROFILE,



"Jeff" <Jeff@nospam.com> wrote in message 
news:448deb77$1@newsgroups.borland.com...
> I'm trying to disconnect a mapped network drive using the code below.  It 
> returns 0 (NO_ERROR), but the drive is still mapped?
>
> intReturn = WNetCancelConnection2("G:", 0, true);
>
> Any thoughts?
>
> Jeff
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads