From: Rahul on 21 Jan 2010 03:32 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 21 Jan 2010 04:18 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 21 Jan 2010 10:22 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 22 Jan 2010 12:12 "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
|
Pages: 1 Prev: mfc debugging Next: Application priveleges on Win 7 and Win Vista |