Skip to content

Latest commit

 

History

History
68 lines (56 loc) · 1.66 KB

nf-ntdef-containing_record.md

File metadata and controls

68 lines (56 loc) · 1.66 KB
UID tech.root title description ms.date targetos prerelease req.assembly req.construct-type req.ddi-compliance req.dll req.header req.idl req.include-header req.irql req.kmdf-ver req.lib req.max-support req.namespace req.redist req.target-min-winverclnt req.target-min-winversvr req.target-type req.type-library req.umdf-ver req.unicode-ansi topic_type api_type api_location api_name f1_keywords dev_langs
NF:ntdef.CONTAINING_RECORD
CONTAINING_RECORD
The CONTAINING_RECORD macro returns the base address of an instance of a structure given the type and the address of a field within the containing structure.
08/03/2022
Windows
false
function
ntdef.h
Any level
Windows 2000
apiref
HeaderDef
ntdef.h
CONTAINING_RECORD
CONTAINING_RECORD
ntdef/CONTAINING_RECORD
c++

-description

The CONTAINING_RECORD macro returns the base address of an instance of a structure given the type of the structure and the address of a field within the containing structure.

-parameters

-param address

[in] A pointer to a field in an instance of a structure of type Type.

-param type

[in] The name of the type of the structure whose base address is to be returned.

-param field

[in] The name of the field pointed to by Address and which is contained in a structure of type Type.

-remarks

Returns a PCHAR containing the address of the base of the structure containing Field.

Called to determine the base address of a structure whose type is known when the caller has a pointer to a field inside such a structure. This macro is useful for symbolically accessing other fields in a structure of known type.