avrt: Add stub for Av(Set,Revert)MmThreadCharacteristics.
This commit is contained in:
parent
201d3ce33f
commit
f17484205a
|
@ -1,5 +1,5 @@
|
|||
@ 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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue