次の方法で共有


GetModuleFileName (Compact 2013)

3/28/2014

This function gets a module file name.

Syntax

WINAPI DWORD GetModuleFileName(
  HMODULE hModule,
  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 Value

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 Embedded Compact, 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

Header

winbase.h

Library

coredll.lib

See Also

Reference

DLL Functions