G
Guest
Hello.
I'm running Win Mobile 5.0 on an ARM XScale, and writing in VS2005 - Visual
Basic with Compact Framework 2.0.
I want to find out (programmaticaly) how much storage space is available on
the Pocket PC, both in main storage ("\") and on a storage card ("\Storage
Card\"), and show a message box if either has less than 16 MB free.
I've tried the following inside a "Public Class Form1" but get a
NotSupportedException error:
Public Declare Function GetDiskFreeSpaceExW Lib "CoreDll.Dll" ( _
ByRef DirectoryName As String, _
ByRef FreeBytesAvailable As Int64, _
ByRef TotalNumberOfBytes As Int64, _
ByRef TotalNumberOfFreeBytes As Int64) As Boolean
Dim res As Boolean
res = Form1.GetDiskFreeSpaceExW("\", FreeBytesAvailable, TotalNumberOfBytes,
TotalNumberOfFreeBytes)
MsgBox(FreeBytesAvailable.ToString)
I've also tried using GlobalMemoryStatus and GetSystemMemoryDivision - these
work without raising an exception, but seem to give me program memory instead
of storage space.
I'm running Win Mobile 5.0 on an ARM XScale, and writing in VS2005 - Visual
Basic with Compact Framework 2.0.
I want to find out (programmaticaly) how much storage space is available on
the Pocket PC, both in main storage ("\") and on a storage card ("\Storage
Card\"), and show a message box if either has less than 16 MB free.
I've tried the following inside a "Public Class Form1" but get a
NotSupportedException error:
Public Declare Function GetDiskFreeSpaceExW Lib "CoreDll.Dll" ( _
ByRef DirectoryName As String, _
ByRef FreeBytesAvailable As Int64, _
ByRef TotalNumberOfBytes As Int64, _
ByRef TotalNumberOfFreeBytes As Int64) As Boolean
Dim res As Boolean
res = Form1.GetDiskFreeSpaceExW("\", FreeBytesAvailable, TotalNumberOfBytes,
TotalNumberOfFreeBytes)
MsgBox(FreeBytesAvailable.ToString)
I've also tried using GlobalMemoryStatus and GetSystemMemoryDivision - these
work without raising an exception, but seem to give me program memory instead
of storage space.