I want to get the size of the phone drive. I'm using "Nokia-PC-Connectivity"., and with respect to File System API I found on CONADifinition function called CONA_Folder_Info but this function doens't support FreeSize and Total Size but there is CONA_Folder.Info2 and its instance support these variables.
But when I used CONA_Folder.Info2 as follows:
CONADefinitions.CONAPI_FOLDER_INFO2 FolderInfo;
int iResult = 0;// Allocate memory for buffer
IntPtr Buffer = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(CONADefinitions.CONAPI_FOLDER_INFO2)));
iResult = CONAFileSystem.CONAFindNextFolder(hFindHandle, Buffer);
while (iResult == PCCSErrors.CONA_OK )
{
FolderInfo = (CONADefinitions.CONAPI_FOLDER_INFO2)Marshal.PtrToStructure(Buffer, typeof(CONADefinitions.CONAPI_FOLDER_INFO2));
if (FolderInfo.pstrName[0].ToString() != "C" && level == 0)
{
}
I get this exception:
FatalExecutionEngineError was detected Message: The runtime has encountered a fatal error. The address of the error was at 0x7a0ba769, on thread 0x1278. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
Note: I use the S60 software platform. Application language is C#.
For more explanations please ask me.