Re: Question abou AIP function: GetDiskFreeSpaceEx(...)

From: Joe Richards [MVP] (humorexpress_at_hotmail.com)
Date: 09/02/04


Date: Wed, 01 Sep 2004 20:21:17 -0400

The issue is that you are connecting with netbios and the machine's name isn't
localhost, it is something else. When you connect with an IP address it does a
NCB adapter reset to get the name table and uses the name sent back.

   joe

--
Joe Richards Microsoft MVP Windows Server Directory Services
www.joeware.net
Jeffrey Meng wrote:
> Hi All,
> 
> I am experiencing a problem here when using  GetDiskFreeSpaceEx(...) API
> funcion.
> 
> The scenario is simple:
> 
> (1).  GetDiskFreeSpaceEx (\\127.0.0.1\C$\, ...) works.
> (2). GetDiskFreeSpaceEx (\\localhost\C$\...) fails, and Last Error Code =
> 52.
> (52 = You were not connected because a duplicate name exists on the network.
> Go to System in Control Panel to change the computer name and try again.)
> 
> Could anyone tell me why (2) doesn't work? Do I need to conver "localhost"
> to "127.0.0.1" to get it to work?
> 
> Thanks a lot.
> 
> Best,
> Jeffrey Meng
> 
> 


Relevant Pages

  • Re: Question abou AIP function: GetDiskFreeSpaceEx(...)
    ... > The issue is that you are connecting with netbios and the machine's name ... > localhost, it is something else. ... > Joe Richards Microsoft MVP Windows Server Directory Services ... >> Jeffrey Meng ...
    (microsoft.public.win32.programmer.kernel)
  • Re: sendmail cannot send outgoing email due to makeconnection faliure
    ... it can receive mail from outside and send mail from localhost to ... but it cannot send outgoing email (e.g. from root@xxxxxxxxxxxxxx to ... try simply connecting with TELNET to gmail-smtp-in.l.google.com:25? ... If that fails, then you can try connecting to the `submission' port, ...
    (comp.mail.sendmail)
  • fetching to docs using wget
    ... Files are downloading but of 0 size:( ... Am i missing any thing ... Connecting to localhost x.x.x.x... ...
    (perl.beginners)
  • Re: Apache Not Responding When Being Accessed From Outside Local Network
    ... > You can easily test this by connecting to the URL ... > from a browser on that machine. ... Hi there, browsing to localhost works. ... apache would log requests from the outside world, ...
    (comp.unix.solaris)
  • Re: [Full-Disclosure] MySQL and the user "su"
    ... > from localhost, but you will not have privileges to do anything else. ... > is because the mysql install by default sets up permissions this way. ... > could verify this yourself by connecting as root, ...
    (Full-Disclosure)