Partager via


GetModuleFileName (Windows CE 5.0)

Send Feedback

This function gets a module file name.

WINAPI DWORDGetModuleFileName( HMODULEhModule,LPWSTR lpFilename,DWORD nSize);

Parameters

  • hModule
    [in] Handle to the module whose executable file name is being requested.

    If this parameter is NULL, GetModuleFileName returns the path for the file used to create the calling process.

  • lpFilename
    [out] Pointer to a buffer that is filled in with the path and file name of the module.

  • nSize
    [in] Specifies the length, in characters, of the lpFilename buffer.

    If the length of the path and file name exceeds this limit, the string is truncated.

Return Values

The length, in characters, of the string copied to the buffer indicates success.

Zero indicates failure.

To get extended error information, call GetLastError.

Remarks

In Windows CE, a DLL is loaded from only one location by the system. All DLLs are stripped of their extension before being compared with the loaded module list. This means that Mydll.dll and Mydll.cpl are the same name and only one can be loaded.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Winbase.h.
Link Library: Coredll.lib.

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.