Microsoft Windows CE 3.0  

CONTAINING_RECORD

Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

This macro returns the base address of an instance of a structure of a specified type if it has the address of a member within the containing structure.

PCHAR CONTAINING_RECORD(
IN PCHAR
Address
,
IN TYPE
Type
,
IN PCHAR
Field
);

Parameters

Address
Pointer to a field in an instance of a structure of type Type.
Type
The name of the type of the structure whose base address is to be returned, for example, type IRP.
Field
The name of the field pointed to by Addresscontained in a structure of type Type.

Return Values

Returns a pointer to the base of the structure containing Field.

Remarks

This macro is 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.

A driver that calls this macro can be running at any IRQ level as long, as the structure is resident. If a page fault might occur, callers must be at or below IRQ level APC_LEVEL.

Requirements

Runs on Versions Defined in Include Link to
Windows CE OS 2.0 and later Winnt.h    
Note   This API is part of the complete Windows CE OS package as provided by Microsoft. The functionality of a particular platform is determined by the original equipment manufacturer (OEM) and some devices may not support this API.


 Last updated on Tuesday, July 13, 2004

© 2004 Microsoft Corporation. All rights reserved.