PC Review
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Too many directories returned by storage card detection functions
Forums
Newsgroups
Microsoft DotNet
Microsoft Dot NET Compact Framework
Too many directories returned by storage card detection functions
![]() |
Too many directories returned by storage card detection functions |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi all,
I have a Windows CE device on which I'm trying to detect the storage card directory path. I know that a way to discover it is to use OpenNetCF functions, that check for Directory and Temporary attribute. The problem is that on that device there are also other 2 directories with that attributes, but I know that they aren't storage card directories (they are called 'Backup' and 'Network' directories, and they are integrated in the device OS image). All the functions that I tried to use (OpenNetCF, FindFirstFlashCard as explained in http://msdn2.microsoft.com/En-US/library/aa458874.aspx) return also these other 2 directories, so I can't programmatically recognize the storage card....also SHGetAutoRunPath function, when a storage card is not inserted, return a path starting by '\Network\...'. Is there any way to get only the real storage card path? From Control Panel, there is a section called 'Storage Manager', and inside that I can see as store info the main store and the storage card (when inserted), is there a standard function that recognize the storage card, discarding the 'Network' and 'Backup' folders? |
|
|
|
#2 |
|
Guest
Posts: n/a
|
If you look in the registry, you can get the profiles for the storage
manager: [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles] You may be able to use that info to determine the storage card's name and then look for that folder, though this might be fairly device-specific. Not sure if that will end up being any better than just hard-coding the name in. -- Chris Tacke, Embedded MVP OpenNETCF Consulting Managed Code in an Embedded World www.OpenNETCF.com "Roberto" <a@a.com> wrote in message news:Ojnx13ltHHA.736@TK2MSFTNGP06.phx.gbl... > Hi all, > I have a Windows CE device on which I'm trying to detect the storage card > directory path. > I know that a way to discover it is to use OpenNetCF functions, that check > for Directory and Temporary attribute. > > The problem is that on that device there are also other 2 directories with > that attributes, but I know that they aren't storage card directories > (they are called 'Backup' and 'Network' directories, and they are > integrated in the device OS image). > > All the functions that I tried to use (OpenNetCF, FindFirstFlashCard as > explained in http://msdn2.microsoft.com/En-US/library/aa458874.aspx) > return also these other 2 directories, so I can't programmatically > recognize the storage card....also SHGetAutoRunPath function, when a > storage card is not inserted, return a path starting by '\Network\...'. > > Is there any way to get only the real storage card path? > From Control Panel, there is a section called 'Storage Manager', and > inside that I can see as store info the main store and the storage card > (when inserted), is there a standard function that recognize the storage > card, discarding the 'Network' and 'Backup' folders? > |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Thanks, at the end I solved mixing the information from
[HKEY_LOCAL_MACHINE\System\StorageManager\Profiles] with the list of directories with Directory and Temporary attributes, it seems to work in the devices I tested (Windows CE 5 / Mobile 2003 & 5). I've seen that Douglas Boiling, in his Programming Windows CE.Net book, checks the directories with that attributes, and then tries to check if that directory can be opened as a volume (creating a file Vol , but also thatmethod doesn't work (it is correct for Network directory, but it doesn't check correctly the Backup folder), so I have to use the info from the registry. "<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote in message news:uw8O29ltHHA.4688@TK2MSFTNGP05.phx.gbl... > If you look in the registry, you can get the profiles for the storage > manager: > > [HKEY_LOCAL_MACHINE\System\StorageManager\Profiles] > > You may be able to use that info to determine the storage card's name and > then look for that folder, though this might be fairly device-specific. > Not sure if that will end up being any better than just hard-coding the > name in. > > > -- > > Chris Tacke, Embedded MVP > OpenNETCF Consulting > Managed Code in an Embedded World > www.OpenNETCF.com > > > "Roberto" <a@a.com> wrote in message > news:Ojnx13ltHHA.736@TK2MSFTNGP06.phx.gbl... >> Hi all, >> I have a Windows CE device on which I'm trying to detect the storage card >> directory path. >> I know that a way to discover it is to use OpenNetCF functions, that >> check for Directory and Temporary attribute. >> >> The problem is that on that device there are also other 2 directories >> with that attributes, but I know that they aren't storage card >> directories (they are called 'Backup' and 'Network' directories, and they >> are integrated in the device OS image). >> >> All the functions that I tried to use (OpenNetCF, FindFirstFlashCard as >> explained in http://msdn2.microsoft.com/En-US/library/aa458874.aspx) >> return also these other 2 directories, so I can't programmatically >> recognize the storage card....also SHGetAutoRunPath function, when a >> storage card is not inserted, return a path starting by '\Network\...'. >> >> Is there any way to get only the real storage card path? >> From Control Panel, there is a section called 'Storage Manager', and >> inside that I can see as store info the main store and the storage card >> (when inserted), is there a standard function that recognize the storage >> card, discarding the 'Network' and 'Backup' folders? >> > > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

, but also that
