From: Rahul on
Hi All,

Are there any API's or system calls through which we can differentiate
between 'local paths" (like hard disk/ attached USB drive) and
"network paths" (e.g. mapped drives on windows/ shared directories
etc.)

Thanks in advance
Rahul
From: Goran on
On Jan 21, 9:32 am, Rahul <rsharma.ch...(a)gmail.com> wrote:
> Hi All,
>
> Are there any API's or system calls through which we can differentiate
> between 'local paths" (like hard disk/ attached USB drive) and
> "network paths" (e.g. mapped drives on windows/ shared directories
> etc.)


Try GetDriveType.
From: Tom Serface on
You may also need to look for the local shares in the registry. I think the
keys can be accessed like:

long result = RegOpenKeyEx(
HKEY_LOCAL_MACHINE,
isNT?
_T("SYSTEM\\CurrentControlSet\\Services\\LanmanServer\\Shares"):
_T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Network\\LanMan"),
0,
KEY_READ,
&mainKey
);

Tom
"Rahul" <rsharma.champ(a)gmail.com> wrote in message
news:8c3657d4-1fd2-4293-af8a-5a37ebd8b992(a)h2g2000yqj.googlegroups.com...
> Hi All,
>
> Are there any API's or system calls through which we can differentiate
> between 'local paths" (like hard disk/ attached USB drive) and
> "network paths" (e.g. mapped drives on windows/ shared directories
> etc.)
>
> Thanks in advance
> Rahul

From: Pete Delgado on

"Rahul" <rsharma.champ(a)gmail.com> wrote in message
news:8c3657d4-1fd2-4293-af8a-5a37ebd8b992(a)h2g2000yqj.googlegroups.com...
> Hi All,
>
> Are there any API's or system calls through which we can differentiate
> between 'local paths" (like hard disk/ attached USB drive) and
> "network paths" (e.g. mapped drives on windows/ shared directories
> etc.)
>
> Thanks in advance
> Rahul

Depending upon the type of information needed, GetDriveType or
WNetGetUniversalName are good options.

-Pete