GetXStateFeaturesMask function (winbase.h)

Returns the mask of XState features set within a CONTEXT structure.

Syntax

BOOL GetXStateFeaturesMask(
  [in]  PCONTEXT Context,
  [out] PDWORD64 FeatureMask
);

Parameters

[in] Context

A pointer to a CONTEXT structure that has been initialized with InitializeContext.

[out] FeatureMask

A pointer to a variable that receives the mask of XState features which are present in the specified CONTEXT structure.

Return value

This function returns TRUE if successful, otherwise FALSE.

Remarks

The GetXStateFeaturesMask function returns the mask of valid features in the specified context. If a CONTEXT is to be passed to GetThreadContext or Wow64GetThreadContext, the application must call SetXStateFeaturesMask to set which features are to be retrieved. GetXStateFeaturesMask should then be called on the CONTEXT returned by GetThreadContext or Wow64GetThreadContext to determine which feature areas contain valid data. If a particular feature bit is not set, the corresponding state is in a processor-specific INITIALIZED state and the contents of the feature area retrieved by LocateXStateFeature are undefined.

The definition of XState features are processor vendor specific. Please refer to the relevant processor reference manuals for additional information on a particular feature.

Note  The value returned by GetXStateFeaturesMask on a CONTEXT after a context operation will always be a subset of the mask specified in a call to SetXStateFeaturesMask prior to the context operation.
 

Windows 7 with SP1 and Windows Server 2008 R2 with SP1:  The AVX API is first implemented on Windows 7 with SP1 and Windows Server 2008 R2 with SP1 . Since there is no SDK for SP1, that means there are no available headers and library files to work with. In this situation, a caller must declare the needed functions from this documentation and get pointers to them using GetModuleHandle on "Kernel32.dll", followed by calls to GetProcAddress. See Working with XState Context for details.

Requirements

Requirement Value
Minimum supported client Windows 7 with SP1 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 with SP1 [desktop apps | UWP apps]
Target Platform Windows
Header winbase.h (include Windows.h)
Library Kernel32.lib
DLL Kernel32.dll

See also

CONTEXT

GetThreadContext

Intel AVX

SetXStateFeaturesMask

Working with XState Context

Wow64GetThreadContext