when i run this code :
CONADefinitions.CONAPI_FOLDER_INFO2 FolderInfo; int iResult = 0; 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)); //......................... i got an error msg here as follows: // Error Messege: FatalExecutionEngineError was detected Message: The runtime has encountered a fatal error. The address of the error was at 0x7a0ba769, on thread 0x1294. 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.
how to use CONADefinitions.CONAPI_FOLDER_INFO2, coz when i use CONADefinitions.CONAPI_FOLDER_INFO it only gives me the name and lable of the device but when is use CONADefinitions.CONAPI_FOLDER_INFO2 it gives me freeSize and TotalSize
please help
I’m not sure what that error means but if you want to get the drive’s size, you can use