IDebugHostModule2::GetBaseLocation 方法 (dbgmodel.h)

GetBaseLocation 方法将模块的基本加载地址作为位置结构返回。 模块返回的位置结构通常引用虚拟地址。

语法

HRESULT GetBaseLocation(
  Location *moduleBaseLocation
);

参数

moduleBaseLocation

内存中模块基的加载地址作为位置结构在此处返回。 通常,这指的是虚拟地址。

返回值

此方法返回指示成功或失败的 HRESULT。

注解

示例代码

ComPtr<IDebugHostModule> spModule; /* get a module (see FindModuleByName) */

Location moduleBase;
if (SUCCEEDED(spModule->GetBaseLocation(&moduleBase)))
{
    // moduleBase contains the base address of the module
}

要求

要求
Header dbgmodel.h

另请参阅

IDebugHostModule2 接口