Board index » delphi » WNetAddConnection2 remapping?
n...@cs.fsu.edu (James Naus)
![]() Delphi Developer |
Sat, 12 May 2001 03:00:00 GMT
|
n...@cs.fsu.edu (James Naus)
![]() Delphi Developer |
Sat, 12 May 2001 03:00:00 GMT
WNetAddConnection2 remapping?I am having problems using WNetAddConnection2 to map an existing drive. James Quote>>>--FSU--> |
Stephen Brow
![]() Delphi Developer |
Sat, 12 May 2001 03:00:00 GMT
Re:WNetAddConnection2 remapping?James, I don't know if this is going to help, but... I found that it sometimes takes a little time to cancel the var -- QuoteJames Naus wrote in message <73f5v6$le...@news.fsu.edu>... |
James Na
![]() Delphi Developer |
Sun, 13 May 2001 03:00:00 GMT
Re:WNetAddConnection2 remapping?The drive connection is getting canceled but it is still mapped. So, I can't use the same drive letter over again. Is there some sort of unmap command. Thanks. James QuoteStephen Brown (sbr...@sprocket.win-uk.net) wrote: : : I don't know if this is going to help, but... : : I found that it sometimes takes a little time to cancel the : connection, so you might try: : : var : Success: integer; : begin : repeat : Success := WNetCancelConnection2(PChar(Drive), 0, False); : until Success = NO_ERROR; : : -- : Stephen Brown : Quote: James Naus wrote in message <73f5v6$le...@news.fsu.edu>... : >I am having problems using WNetAddConnection2 to map an existing : drive. : >If I use explorer to disconnect the drive I can remap another with : out any : >problems. I have tried using the WNetCancelConnection2 command and : it : >breaks the network connection but the mapping remains and I can not : change : >the mapping. What I am trying to do is write a program to check the : drive : >space of all our servers and I believe I need a drive mapping to use : >DiskSpace and DiskFree. So, in order to do this I have to remap a : local : >drive many times. Thanks for any help or let me know if I am doing : this : >all wrong. This is going to run on a Win95 box or maybe an NT4.0 : box. : : : -- |
James Na
![]() Delphi Developer |
Sun, 13 May 2001 03:00:00 GMT
Re:WNetAddConnection2 remapping?Sorry to follow my own post but I have more info. The error that I get is : The drive connection is getting canceled but it is still mapped. So, I -- |
Stephen Brow
![]() Delphi Developer |
Mon, 14 May 2001 03:00:00 GMT
Re:WNetAddConnection2 remapping?Hi James, Well, the error is reporting exactly what you are seeing: the drive Are you passing the CONNECT_UPDATE_PROFILE flag when you call Alternatively, try passing that same flag when you cancel the -- QuoteJames Naus wrote in message <73hkiv$rr...@news.fsu.edu>... |