quand je lance ce code:Problème: Obtenir une taille de l'unité mobile en utilisant C# lève une exception - Commentés
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.
comment utiliser CONADefinitions.CONAPI_FOLDER_INFO2, coz quand je l'utilise CONADefinitions.CONAPI_FOLDER_INFO il me donne seulement le nom et lable du dispositif mais quand est l'utilisation CONADefinitions.CONAPI_FOLDER_INFO2 il me donne FREESIZE et TotalSize
s'il vous plaît aider
Pourquoi cette question a été rejetée? – Kamarey