Hello,
To get the free disk space, I can use 2 functions :
GetDiskFreeSpaceExW is for unicode version) and GetDiskFreeSpaceExA is for ANSI version
Soft Declare Function GetDiskFreeSpaceExA Lib "Kernel32" ( directory as CString, freeBytesForCaller as Ptr, _
totalBytes as Ptr, totalFreeBytes as Ptr ) as Integer
Soft Declare Function GetDiskFreeSpaceExW Lib "Kernel32" ( directory as WString, freeBytesForCaller as Ptr, _
totalBytes as Ptr, totalFreeBytes as Ptr ) as Integer
For GetDiskFreeSpaceExA, I know I must provide the directory parameter converted to Encodings.WindowsLatin1
rootPath = ConvertEncoding(root.AbsolutePath, Encodings.WindowsLatin1)
My question is : what is the correct encoding for GetDiskFreeSpaceExW ?
Must I provide the path as it is (UTF8) : rootPath = root.AbsolutePath
or must I convert to Encodings.WindowsLatin1 also ?
Thank you