🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #3462

Re: Disconnect Mapped Drive

#3462
From: 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
> 
Technical Details
Message-ID: <448e7707$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <448deb77$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,7da1bc1485c334c2
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Mike Collins" <its@TheBottomOfThePost.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <448deb77$1@newsgroups.borland.com>
Subject: Re: Disconnect Mapped Drive
Date: Tue, 13 Jun 2006 09:27:48 +0100
Lines: 23
Organization: SDA Ltd
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.2663
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2663
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 81.2.92.14
Message-ID: <448e7707$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1150187271 81.2.92.14 (13 Jun 2006 01:27:51 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail