ReactOS 0.4.16-dev-340-g0540c21
main.c File Reference
#include <stdarg.h>
#include <stdlib.h>
#include "windef.h"
#include "winbase.h"
#include "winnls.h"
#include "wine/debug.h"
#include "avrt.h"
Include dependency graph for main.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (avrt)
 
static WCHARstrdupAW (const char *src)
 
HANDLE WINAPI AvSetMmThreadCharacteristicsA (const char *name, DWORD *index)
 
HANDLE WINAPI AvSetMmThreadCharacteristicsW (const WCHAR *name, DWORD *index)
 
BOOL WINAPI AvQuerySystemResponsiveness (HANDLE AvrtHandle, ULONG *value)
 
BOOL WINAPI AvRevertMmThreadCharacteristics (HANDLE AvrtHandle)
 
BOOL WINAPI AvSetMmThreadPriority (HANDLE AvrtHandle, AVRT_PRIORITY prio)
 
HANDLE WINAPI AvSetMmMaxThreadCharacteristicsA (const char *task1, const char *task2, DWORD *index)
 
HANDLE WINAPI AvSetMmMaxThreadCharacteristicsW (const WCHAR *task1, const WCHAR *task2, DWORD *index)
 

Function Documentation

◆ AvQuerySystemResponsiveness()

BOOL WINAPI AvQuerySystemResponsiveness ( HANDLE  AvrtHandle,
ULONG value 
)

Definition at line 77 of file main.c.

78{
79 FIXME("(%p, %p): stub\n", AvrtHandle, value);
80 return FALSE;
81}
#define FIXME(fmt,...)
Definition: precomp.h:53
#define FALSE
Definition: types.h:117
Definition: pdh_main.c:94

◆ AvRevertMmThreadCharacteristics()

BOOL WINAPI AvRevertMmThreadCharacteristics ( HANDLE  AvrtHandle)

Definition at line 83 of file main.c.

84{
85 FIXME("(%p): stub\n", AvrtHandle);
86 return TRUE;
87}
#define TRUE
Definition: types.h:120

◆ AvSetMmMaxThreadCharacteristicsA()

HANDLE WINAPI AvSetMmMaxThreadCharacteristicsA ( const char task1,
const char task2,
DWORD index 
)

Definition at line 95 of file main.c.

96{
97 WCHAR *task1W = NULL, *task2W = NULL;
98 HANDLE ret;
99
100 if (task1 && !(task1W = strdupAW(task1)))
101 {
103 return NULL;
104 }
105
106 if (task2 && !(task2W = strdupAW(task2)))
107 {
109 return NULL;
110 }
111
112 ret = AvSetMmMaxThreadCharacteristicsW(task1W, task2W, index);
113
114 free(task2W);
115 free(task1W);
116 return ret;
117}
#define free
Definition: debug_ros.c:5
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
#define NULL
Definition: types.h:112
static WCHAR * strdupAW(const char *src)
Definition: main.c:31
HANDLE WINAPI AvSetMmMaxThreadCharacteristicsW(const WCHAR *task1, const WCHAR *task2, DWORD *index)
Definition: main.c:119
#define SetLastError(x)
Definition: compat.h:752
GLuint index
Definition: glext.h:6031
int ret
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ AvSetMmMaxThreadCharacteristicsW()

HANDLE WINAPI AvSetMmMaxThreadCharacteristicsW ( const WCHAR task1,
const WCHAR task2,
DWORD index 
)

Definition at line 119 of file main.c.

120{
121 FIXME("(%s,%s,%p): stub\n", debugstr_w(task1), debugstr_w(task2), index);
122
123 if (!task1 || task2)
124 {
126 return NULL;
127 }
128
129 if (!index)
130 {
132 return NULL;
133 }
134
135 return (HANDLE)0x12345678;
136}
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
#define debugstr_w
Definition: kernel32.h:32
#define ERROR_INVALID_TASK_NAME
Definition: winerror.h:956

Referenced by AvSetMmMaxThreadCharacteristicsA().

◆ AvSetMmThreadCharacteristicsA()

HANDLE WINAPI AvSetMmThreadCharacteristicsA ( const char name,
DWORD index 
)

Definition at line 41 of file main.c.

42{
43 WCHAR *nameW = NULL;
44 HANDLE ret;
45
46 if (name && !(nameW = strdupAW(name)))
47 {
49 return NULL;
50 }
51
53
54 free(nameW);
55 return ret;
56}
static const WCHAR nameW[]
Definition: main.c:49
HANDLE WINAPI AvSetMmThreadCharacteristicsW(const WCHAR *name, DWORD *index)
Definition: main.c:58
Definition: name.c:39

◆ AvSetMmThreadCharacteristicsW()

HANDLE WINAPI AvSetMmThreadCharacteristicsW ( const WCHAR name,
DWORD index 
)

Definition at line 58 of file main.c.

59{
60 FIXME("(%s,%p): stub\n", debugstr_w(name), index);
61
62 if (!name)
63 {
65 return NULL;
66 }
67
68 if (!index)
69 {
71 return NULL;
72 }
73
74 return (HANDLE)0x12345678;
75}

Referenced by AvSetMmThreadCharacteristicsA().

◆ AvSetMmThreadPriority()

BOOL WINAPI AvSetMmThreadPriority ( HANDLE  AvrtHandle,
AVRT_PRIORITY  prio 
)

Definition at line 89 of file main.c.

90{
91 FIXME("(%p)->(%u) stub\n", AvrtHandle, prio);
92 return TRUE;
93}

◆ strdupAW()

static WCHAR * strdupAW ( const char src)
inlinestatic

Definition at line 31 of file main.c.

32{
33 int len;
34 WCHAR *dst;
35 if (!src) return NULL;
36 len = MultiByteToWideChar(CP_ACP, 0, src, -1, NULL, 0);
37 if ((dst = malloc(len * sizeof(*dst)))) MultiByteToWideChar(CP_ACP, 0, src, -1, dst, len);
38 return dst;
39}
#define malloc
Definition: debug_ros.c:4
#define CP_ACP
Definition: compat.h:109
#define MultiByteToWideChar
Definition: compat.h:110
GLenum src
Definition: glext.h:6340
GLenum GLenum dst
Definition: glext.h:6340
GLenum GLsizei len
Definition: glext.h:6722

Referenced by addr_to_str(), AvSetMmMaxThreadCharacteristicsA(), AvSetMmThreadCharacteristicsA(), InternetGetProxyInfo(), JSPROXY_InternetInitializeAutoProxyDll(), parse_script_result(), and WinHttpDetectAutoProxyConfigUrl().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( avrt  )