locked
ReadFile failed on Windows CE 6 emulator SD card RRS feed

  • Question

  • Hi,

    I experienced a strange problem when I tried to read from Windows CE 6 emulator Storage Card. It failed with system error 5 (access denied). In the meantime on emulator display it indicated that "an problem occurred in filesys.exe" and crashed. But I have no problem either with internal storage on emulator or with physical device storage card. Any help appreciated.

               hHandle = CreateFile (szFileName, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
                
                if (! WriteFile(hHandle, szServiceName, 7, &dwBytesWrote, NULL)) {
                    dwLastError = GetLastError();
                }

                if (! SetFilePointer(hHandle, 0, NULL, FILE_BEGIN)) {
                    dwLastError = GetLastError();
                }

                if ( ! ReadFile (hHandle, pView, 7, NULL, NULL) ) {
                    dwLastError = GetLastError(); 

                }

    Tuesday, December 9, 2014 6:47 PM

All replies