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

From: Jeffrey Meng (mengjinjie_at_yahoo.com)
Date: 09/02/04


Date: Thu, 2 Sep 2004 11:07:03 -0400

Thanks a lot.

"Joe Richards [MVP]" <humorexpress@hotmail.com> wrote in message
news:Ok5G9KIkEHA.1348@TK2MSFTNGP15.phx.gbl...
> 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
> >
> >