Skip to content

Latest commit

 

History

History
137 lines (105 loc) · 4.31 KB

nf-avrt-avsetmmmaxthreadcharacteristicsw.md

File metadata and controls

137 lines (105 loc) · 4.31 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:avrt.AvSetMmMaxThreadCharacteristicsW
AvSetMmMaxThreadCharacteristicsW function (avrt.h)
Associates the calling thread with the specified tasks. (Unicode)
AvSetMmMaxThreadCharacteristics
AvSetMmMaxThreadCharacteristics function
AvSetMmMaxThreadCharacteristicsW
avrt/AvSetMmMaxThreadCharacteristics
avrt/AvSetMmMaxThreadCharacteristicsW
base.avsetmmmaxthreadcharacteristics
base\avsetmmmaxthreadcharacteristics.htm
backup
d8137b53-b1fd-4c25-909a-d0ed671848df
12/05/2018
AvSetMmMaxThreadCharacteristics, AvSetMmMaxThreadCharacteristics function, AvSetMmMaxThreadCharacteristicsA, AvSetMmMaxThreadCharacteristicsW, avrt/AvSetMmMaxThreadCharacteristics, avrt/AvSetMmMaxThreadCharacteristicsA, avrt/AvSetMmMaxThreadCharacteristicsW, base.avsetmmmaxthreadcharacteristics
avrt.h
Windows
Windows Vista [desktop apps only]
Windows Server 2008 [desktop apps only]
AvSetMmMaxThreadCharacteristicsW (Unicode) and AvSetMmMaxThreadCharacteristicsA (ANSI)
Avrt.lib
Avrt.dll
Windows
19H1
AvSetMmMaxThreadCharacteristicsW
avrt/AvSetMmMaxThreadCharacteristicsW
c++
APIRef
kbSyntax
DllExport
Avrt.dll
AvSetMmMaxThreadCharacteristics
AvSetMmMaxThreadCharacteristicsA
AvSetMmMaxThreadCharacteristicsW

AvSetMmMaxThreadCharacteristicsW function

-description

Associates the calling thread with the specified tasks.

-parameters

-param FirstTask [in]

The name of the first task to be performed. This name must match the name of one of the subkeys of the following key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks.

-param SecondTask [in]

The name of the second task to be performed. This name must match the name of one of the subkeys of the following key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile\Tasks.

-param TaskIndex [in, out]

The unique task identifier. The first time this function is called, this value must be 0 on input. The index value is returned on output and can be used as input in subsequent calls.

-returns

If the function succeeds, it returns a handle to the task.

If the function fails, it returns 0. To retrieve extended error information, call GetLastError.

The following are possible error codes.

Return code Description
ERROR_INVALID_TASK_INDEX
Either TaskIndex is not 0 on the first call or is not recognized value (on subsequent calls).
ERROR_INVALID_TASK_NAME
The specified task does not match any of the tasks stored in the registry.
ERROR_PRIVILEGE_NOT_HELD
The caller does not have sufficient privilege.

-remarks

The resulting characteristics of the thread performing the tasks reflect the task with the highest priority.

When the task is completed, call the AvRevertMmThreadCharacteristics function.

Note

The avrt.h header defines AvSetMmMaxThreadCharacteristics as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

-see-also

Multimedia Class Scheduler Service