RtGetModuleBaseName

The RtGetModuleBaseName function retrieves the base name of a specified module.

Syntax

DWORD RtGetModuleBaseName(
    HANDLE hProcess,
    HMODULE hModule,
    LPTSTR lpBaseName,
    DWORD nSize,
);

Parameters

hProcess

A handle to the RTSS process that contains the module.

hModule

A handle to the module. If this parameter is NULL, this function returns the name of the file used to create the process specified by parameter hProcess.

lpBaseName

A pointer to the buffer that receives the base name of the module. If the base name is longer than maximum number of characters specified by the nSize parameter, the base name is truncated.

nSize

The size of the lpBaseName buffer, in characters.

Return Value

If the function succeeds, the return value specifies the length of the string copied to the buffer, in characters. If the function fails, the return value is zero.

To get extended error information, call GetLastError.

Remarks

The RtGetModuleBaseName function is primarily designed for use by debuggers and similar applications that must extract module information from another process. If the module list in the target process is corrupted or is not yet initialized, or if the module list changes during the function call as a result of RTDLLs being loaded or unloaded, RtGetModuleBaseName may fail or return incorrect information.

Requirements

Minimum Supported Version RTX64 2013
Header Rtapi.h
Library RtApi.lib (Windows), Rtx_Rtss.lib (RTSS)