Microsoft KB Archive/290755

= BUG: GetModuleFileName Behaves Incorrectly on External FSDMGR-Based File Systems =

Article ID: 290755

Article Last Modified on 2/12/2007

-

APPLIES TO


 * Microsoft Windows CE Platform Builder 2.12
 * Microsoft Encarta Reference Suite 2001

-



This article was previously published under Q290755



SYMPTOMS
A call to the function GetModuleFileName on a file that was loaded from an external FSDMGR-based file system fails. Additionally, if you call GetModuleFileName(NULL) from a program running on an external FSDMGR-based file system, it fails.



CAUSE
Windows CE assumes that the call to GetModuleFileName contains a valid OID, thus causing the problem.



RESOLUTION
To work around this problem do the following:   In GetFileInformationByHandle, set the dwOID member of BY_HANDLE_FILE_INFO to INVALID_HANDLE_VALUE. For example: lpFileInformationByHandle->dwOID = (DWORD)INVALID_HANDLE_VALUE;  In FindFirstFile and FindNextFile, set the dwOID member of WIN32_FIND_DATA to INVALID_HANDLE_VALUE.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

Additional query words: filesys fsdmgr flash storage

Keywords: kbbug kbfix KB290755

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.