Export (0) Print
Expand All
Expand Minimize
1 out of 1 rated this helpful - Rate this topic

AvSetMmMaxThreadCharacteristics function

Associates the calling thread with the specified tasks.

Syntax


HANDLE WINAPI AvSetMmMaxThreadCharacteristics(
  _In_     LPCTSTR FirstTask,
  _In_     LPCTSTR SecondTask,
  _Inout_  LPDWORD TaskIndex
);

Parameters

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.

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.

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.

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, call GetLastError.

The following are possible error codes.

Return codeDescription
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.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Avrt.h

Library

Avrt.lib

DLL

Avrt.dll

Unicode and ANSI names

AvSetMmMaxThreadCharacteristicsW (Unicode) and AvSetMmMaxThreadCharacteristicsA (ANSI)

See also

Multimedia Class Scheduler Service

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.