SetXStateFeaturesMask function

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

Syntax

BOOL SetXStateFeaturesMask(
  PCONTEXT Context,
  DWORD64  FeatureMask
);

Parameters

Context

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

FeatureMask

A mask of XState features to set in the specified CONTEXT structure.

Return Value

This function returns TRUE if successful, otherwise FALSE.

Remarks

The SetXStateFeaturesMask function sets the mask of valid features in the specified context. Before calling GetThreadContext, Wow64GetThreadContext, SetThreadContext, or Wow64SetThreadContext the application must call SetXStateFeaturesMask to specify which set of features to retrieve or set. The system silently ignores any feature specified in the FeatureMask which is not enabled on the processor.

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

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

See Also

CONTEXT

GetThreadContext

Intel AVX

SetThreadContext

Working with XState Context

Wow64GetThreadContext

Wow64SetThreadContext