[PATCH 05/12] avrt: Add stub for Av(Set,Revert)MmThreadCharacteristics and
Maarten Lankhorst (none)
mlankhorst at patser.
Tue Nov 10 14:13:23 CST 2009
---
dlls/avrt/avrt.spec | 6 +++---
dlls/avrt/main.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 48 insertions(+), 3 deletions(-)
diff --git a/dlls/avrt/avrt.spec b/dlls/avrt/avrt.spec
index 103798d..a253d9a 100644
--- a/dlls/avrt/avrt.spec
+++ b/dlls/avrt/avrt.spec
@@ -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
diff --git a/dlls/avrt/main.c b/dlls/avrt/main.c
index 8d45281..6cd846b 100644
--- a/dlls/avrt/main.c
+++ b/dlls/avrt/main.c
@@ -23,6 +23,7 @@
#include "windef.h"
#include "winbase.h"
+#include "winnls.h"
#include "wine/debug.h"
#include "avrt.h"
@@ -46,3 +47,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)(LONG_PTR)-1;
+}
+
+BOOL WINAPI AvRevertMmThreadCharacteristics(HANDLE AvrtHandle)
+{
+ FIXME("(%p): stub\n", AvrtHandle);
+ return 1;
+}
+
--
1.6.5.2
--------------000502030401090101060609--
More information about the wine-patches
mailing list