Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit focus mode

AvSetMmThreadCharacteristicsA function (avrt.h)

  • 2024-11-20
Feedback

In this article

Associates the calling thread with the specified task.

Syntax

AVRTAPI HANDLE AvSetMmThreadCharacteristicsA(  [in]      LPCSTR  TaskName,  [in, out] LPDWORD TaskIndex);

Parameters

[in] TaskName

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

[in, out] TaskIndex

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.

Return value

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

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

The following are possible error codes.

Return codeDescription
ERROR_INVALID_TASK_INDEX
EitherTaskIndex 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

When the task is completed, call theAvRevertMmThreadCharacteristics function.

Note

The avrt.h header defines AvSetMmThreadCharacteristics as an alias that 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 is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, seeConventions for Function Prototypes.

Requirements

RequirementValue
Minimum supported clientWindows Vista [desktop apps only]
Minimum supported serverWindows Server 2008 [desktop apps only]
Target PlatformWindows
Headeravrt.h
LibraryAvrt.lib
DLLAvrt.dll

See also

Multimedia Class Scheduler Service


Feedback

Was this page helpful?

YesNo

In this article

Was this page helpful?

YesNo