FindFirstFlashCard/FindNextFlashCard
-
I am attempting to access these functions through a .NET wrapper. I am using P/Invoke, but I am having very little success. Does anyone out there have an example of how to do this? When I can get it compiled and the call made, I get a NotSupportedException returned with very little explanation. Other times, I can't get it to compile because I have been unable to fill the Long variable (acting as a LPWIN32_FIND_DATA object) I am passing to the function call properly prior to use. Any thoughts on this? Thanks Dan
-
I am attempting to access these functions through a .NET wrapper. I am using P/Invoke, but I am having very little success. Does anyone out there have an example of how to do this? When I can get it compiled and the call made, I get a NotSupportedException returned with very little explanation. Other times, I can't get it to compile because I have been unable to fill the Long variable (acting as a LPWIN32_FIND_DATA object) I am passing to the function call properly prior to use. Any thoughts on this? Thanks Dan
Hi, FindFirstFlashCard and FindNextFlashCard would be very difficult to P/Invoke in the .NET Compact Framework. But there is an answer on this here: http://www.cjcraft.com/DesktopDefault.aspx?tabid=38 Q. How do I find any removable storage devices that may be installed on the Pocket PC device in the .NET Compact Framework. DirectoryInfo rootDir = new DirectoryInfo(@"\"); FileAttributes attrStorageCard = FileAttributes.Directory | FileAttributes.Temporary; foreach( FileSystemInfo fsi in rootDir.GetFileSystemInfos() ) if ( (fsi.Attributes & attrStorageCard) == attrStorageCard ) //Found storage card
-
Hi, FindFirstFlashCard and FindNextFlashCard would be very difficult to P/Invoke in the .NET Compact Framework. But there is an answer on this here: http://www.cjcraft.com/DesktopDefault.aspx?tabid=38 Q. How do I find any removable storage devices that may be installed on the Pocket PC device in the .NET Compact Framework. DirectoryInfo rootDir = new DirectoryInfo(@"\"); FileAttributes attrStorageCard = FileAttributes.Directory | FileAttributes.Temporary; foreach( FileSystemInfo fsi in rootDir.GetFileSystemInfos() ) if ( (fsi.Attributes & attrStorageCard) == attrStorageCard ) //Found storage card
THANK YOU, THANK YOU, THANK YOU! I couldn't understand why there wasn't a way implemented in managed code to find them. Thanks again Dan