Commit f1748420 authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Alexandre Julliard

avrt: Add stub for Av(Set,Revert)MmThreadCharacteristics.

parent 201d3ce3
@ stub AvQuerySystemResponsiveness
@ stub AvRevertMmThreadCharacteristics
@ stdcall AvRevertMmThreadCharacteristics(long)
@ stub AvRtCreateThreadOrderingGroup
@ stub AvRtCreateThreadOrderingGroupExA
@ stub AvRtCreateThreadOrderingGroupExW
......@@ -9,6 +9,6 @@
@ stub AvRtWaitOnThreadOrderingGroup
@ stub AvSetMmMaxThreadCharacteristicsA
@ stub AvSetMmMaxThreadCharacteristicsW
@ stub AvSetMmThreadCharacteristicsA
@ stub AvSetMmThreadCharacteristicsW
@ stdcall AvSetMmThreadCharacteristicsA(str ptr)
@ stdcall AvSetMmThreadCharacteristicsW(wstr ptr)
@ stub AvSetMmThreadPriority
......@@ -23,6 +23,7 @@
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "wine/debug.h"
#include "avrt.h"
......@@ -45,3 +46,47 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return TRUE;
}
HANDLE WINAPI AvSetMmThreadCharacteristicsA(LPCSTR TaskName, LPDWORD TaskIndex)
{
HANDLE ret;
LPWSTR str = NULL;
if (TaskName)
{
DWORD len = (lstrlenA(TaskName)+1);
str = HeapAlloc(GetProcessHeap, 0, len*sizeof(WCHAR));
if (!str)
{
SetLastError(ERROR_OUTOFMEMORY);
return NULL;
}
MultiByteToWideChar(CP_ACP, 0, TaskName, len, str, len);
}
ret = AvSetMmThreadCharacteristicsW(str, TaskIndex);
HeapFree(GetProcessHeap(), 0, str);
return ret;
}
HANDLE WINAPI AvSetMmThreadCharacteristicsW(LPCWSTR TaskName, LPDWORD TaskIndex)
{
FIXME("(%s,%p): stub\n", debugstr_w(TaskName), TaskIndex);
if (!TaskName)
{
SetLastError(ERROR_INVALID_TASK_NAME);
return NULL;
}
if (!TaskIndex)
{
SetLastError(ERROR_INVALID_HANDLE);
return NULL;
}
return (HANDLE)0x12345678;
}
BOOL WINAPI AvRevertMmThreadCharacteristics(HANDLE AvrtHandle)
{
FIXME("(%p): stub\n", AvrtHandle);
return 1;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment