wined3d: Use wined3d_resource_gl_legacy_map_flags() in wined3d_buffer_gl_map().
[wine.git] / dlls / avrt / main.c
blobeb5704cc508c8f206feafbbcbc15deb0817197ee
1 /* Avrt dll implementation
3 * Copyright (C) 2009 Maarten Lankhorst
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 #include <stdarg.h>
22 #include "windef.h"
23 #include "winbase.h"
24 #include "winnls.h"
25 #include "wine/debug.h"
26 #include "avrt.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(avrt);
30 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
32 TRACE("(0x%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
34 switch (fdwReason)
36 case DLL_WINE_PREATTACH:
37 return FALSE; /* prefer native version */
38 case DLL_PROCESS_ATTACH:
39 DisableThreadLibraryCalls(hinstDLL);
40 break;
43 return TRUE;
46 HANDLE WINAPI AvSetMmThreadCharacteristicsA(LPCSTR TaskName, LPDWORD TaskIndex)
48 HANDLE ret;
49 LPWSTR str = NULL;
51 if (TaskName)
53 DWORD len = (lstrlenA(TaskName)+1);
54 str = HeapAlloc(GetProcessHeap(), 0, len*sizeof(WCHAR));
55 if (!str)
57 SetLastError(ERROR_OUTOFMEMORY);
58 return NULL;
60 MultiByteToWideChar(CP_ACP, 0, TaskName, len, str, len);
62 ret = AvSetMmThreadCharacteristicsW(str, TaskIndex);
63 HeapFree(GetProcessHeap(), 0, str);
64 return ret;
67 HANDLE WINAPI AvSetMmThreadCharacteristicsW(LPCWSTR TaskName, LPDWORD TaskIndex)
69 FIXME("(%s,%p): stub\n", debugstr_w(TaskName), TaskIndex);
71 if (!TaskName)
73 SetLastError(ERROR_INVALID_TASK_NAME);
74 return NULL;
76 if (!TaskIndex)
78 SetLastError(ERROR_INVALID_HANDLE);
79 return NULL;
81 return (HANDLE)0x12345678;
84 BOOL WINAPI AvQuerySystemResponsiveness(HANDLE AvrtHandle, ULONG *value)
86 FIXME("(%p, %p): stub\n", AvrtHandle, value);
87 return FALSE;
90 BOOL WINAPI AvRevertMmThreadCharacteristics(HANDLE AvrtHandle)
92 FIXME("(%p): stub\n", AvrtHandle);
93 return TRUE;
96 BOOL WINAPI AvSetMmThreadPriority(HANDLE AvrtHandle, AVRT_PRIORITY prio)
98 FIXME("(%p)->(%u) stub\n", AvrtHandle, prio);
99 return TRUE;