大网数据广告活动
Windows 系统接口

RtlDisownModuleHeapAllocation function

· 52CE 我爱测

Removes an allocation from tracking by Application Verifier so that it isn't flagged as a leak when the module that allocated the memory is unloaded.

Removes an allocation from tracking by Application Verifier so that it isn't flagged as a leak when the module that allocated the memory is unloaded.

Syntax

NTSTATUS WINAPI RtlDisownModuleHeapAllocation(
  _In_ HANDLE HeapHandle,
  _In_ PVOID Allocation
);

Parameters

HeapHandle

Type: HANDLE

The heap handle where the allocation is made.

Allocation

Type: PVOID

A pointer to the memory allocation to be ignored by Application Verifier leak tracking.

Return value

Returns STATUS_SUCCESS.

Remarks

RtlDisownModuleHeapAllocation is provided so that Application Verifier can expect that an allocation might outlive the module that allocated it. In that case, Application Verifier can remove the allocation from its internal tracking so that it isn't flagged as a leak when the module that made the allocation is unloaded. This function is a no-op when Application Verifier isn't enabled.

RtlDisownModuleHeapAllocation isn't associated with a header file. But the associated import library, Ntdll.lib, is available in the Windows Driver Kit (WDK). You can also call RtlDisownModuleHeapAllocation by first using the LoadLibrary function (to load Ntdll.dll), and then by calling the GetProcAddress function to retrieve the address of RtlDisownModuleHeapAllocation.

Requirements

   
Target Platform Windows
Header N/A
Library Ntdll.lib in the Windows Driver Kit (WDK)
DLL Ntdll.dll

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 03/13/2022
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。