Does NetFileEnum basepath parameter accept UNC? 
Author Message
 Does NetFileEnum basepath parameter accept UNC?

Hi All,

I'm having difficulty with the basepath parameter of the NetFileEnum
function.

If I set the basepath to "c:\temp" NetFileEnum will enumerate the
resources in use for the server I've defined (\\devtest)

However, if I use "\\devtest\c\temp" then NetFileEnum doesn't
recognise the resources in use and returns nothing.

Is there a particular way I need to specify the UNC path, or does the
parameter not accept UNC paths?

Many thanks in advance,
Grant Holdom.



Sun, 18 Jan 2004 13:33:21 GMT  
 Does NetFileEnum basepath parameter accept UNC?
I've never tried it that way, but rather always fed it the servername and
basepath parameters separately.

A UNC host name seems redunadant (in the basepath) if it's already implied
in the first parameter?

...Chris.

Quote:

> Hi All,

> I'm having difficulty with the basepath parameter of the NetFileEnum
> function.

> If I set the basepath to "c:\temp" NetFileEnum will enumerate the
> resources in use for the server I've defined (\\devtest)

> However, if I use "\\devtest\c\temp" then NetFileEnum doesn't
> recognise the resources in use and returns nothing.

> Is there a particular way I need to specify the UNC path, or does the
> parameter not accept UNC paths?



Sun, 18 Jan 2004 14:39:54 GMT  
 Does NetFileEnum basepath parameter accept UNC?
I've never tried it that way, but rather always fed it the servername and
basepath parameters separately.

A UNC host name seems redundant (in the basepath) if it's already implied in
the first parameter?

...Chris.

Quote:

> I'm having difficulty with the basepath parameter of the NetFileEnum
> function.

> If I set the basepath to "c:\temp" NetFileEnum will enumerate the
> resources in use for the server I've defined (\\devtest)

> However, if I use "\\devtest\c\temp" then NetFileEnum doesn't
> recognise the resources in use and returns nothing.

> Is there a particular way I need to specify the UNC path, or does the
> parameter not accept UNC paths?



Sun, 18 Jan 2004 14:49:38 GMT  
 Does NetFileEnum basepath parameter accept UNC?
basepath
[in] Pointer to a Unicode (Windows NT/2000/XP) or ANSI (Windows 95/98/Me)
string specifying a qualifier for the returned information. If this
parameter is NULL, all open resources are enumerated. If this parameter is
not NULL, the function enumerates only resources that have basepath as a
prefix. (A prefix is the path component up to a backslash.)

basepath is a simple filter, it isn't going to convert a sharename (unc)
path to a fixed name path for you.

--
---
Joe Richards

Opinions expressed are, as always, Joe's and probably insulting to someone
somewhere so just relax. =)
http://www.joeware.net


Quote:
> Hi All,

> I'm having difficulty with the basepath parameter of the NetFileEnum
> function.

> If I set the basepath to "c:\temp" NetFileEnum will enumerate the
> resources in use for the server I've defined (\\devtest)

> However, if I use "\\devtest\c\temp" then NetFileEnum doesn't
> recognise the resources in use and returns nothing.

> Is there a particular way I need to specify the UNC path, or does the
> parameter not accept UNC paths?

> Many thanks in advance,
> Grant Holdom.



Sun, 18 Jan 2004 21:12:31 GMT  
 Does NetFileEnum basepath parameter accept UNC?
The usual UNC specification is \\MachineName\ShareName followed by
optional path/file specifications.  The "c" in your example looks to me
as if you're trying to identify the c: drive of the remote machine, which
you can't actually do - you must share a folder as a share name, and
refer to the share name; you can, of course, share c:\ with a share name,
but you still refer to the share name.
Quote:

> Hi All,

> I'm having difficulty with the basepath parameter of the NetFileEnum
> function.

> If I set the basepath to "c:\temp" NetFileEnum will enumerate the
> resources in use for the server I've defined (\\devtest)

> However, if I use "\\devtest\c\temp" then NetFileEnum doesn't
> recognise the resources in use and returns nothing.

> Is there a particular way I need to specify the UNC path, or does the
> parameter not accept UNC paths?

> Many thanks in advance,
> Grant Holdom.



Sun, 18 Jan 2004 22:27:23 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. CreateTableDef Does Not Accept vbAttachedTable as Parameter

2. SQL doesnt accept boolean parameters !!!

3. How to accept parameters

4. Form accepting parameter?

5. Accepting command line parameters with VB

6. How to accept Command Line parameter in VB6.

7. accepting parameters on startup

8. Creating VB EXE that accepts parameters when called

9. Creating a VB exe that accepts parameters

10. How to Accept Startup Parameter?

11. VB program that accepts parameter

12. Parameters do not accept Null Values

 

 
Powered by phpBB® Forum Software