當我運行這段代碼:當我使用CONADefinitions.CONAPI_FOLDER_INFO問題:獲取使用C#移動驅動器大小引發異常 - 評論
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.
如何使用CONADefinitions.CONAPI_FOLDER_INFO2,怎麼只給我起的名字和該設備 的拉布勒但是當在使用CONADefinitions.CONAPI_FOLDER_INFO2它給我FREESIZE和總計TOTALSIZE
請幫助
爲什麼這個問題被拒絕? – Kamarey 2009-08-04 12:21:30