ReactOS 0.4.15-dev-7674-gc0b4db1
loadperf_main.c File Reference
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "winnls.h"
#include "wine/debug.h"
#include "loadperf.h"
Include dependency graph for loadperf_main.c:

Go to the source code of this file.

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (loadperf)
 
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
 
static WCHARstrdupAW (const char *str)
 
DWORD WINAPI InstallPerfDllA (LPCSTR computer, LPCSTR ini, ULONG_PTR flags)
 
DWORD WINAPI InstallPerfDllW (LPCWSTR computer, LPCWSTR ini, ULONG_PTR flags)
 
DWORD WINAPI LoadPerfCounterTextStringsA (LPCSTR cmdline, BOOL quiet)
 
DWORD WINAPI LoadPerfCounterTextStringsW (LPCWSTR cmdline, BOOL quiet)
 
DWORD WINAPI UnloadPerfCounterTextStringsA (LPCSTR cmdline, BOOL quiet)
 
DWORD WINAPI UnloadPerfCounterTextStringsW (LPCWSTR cmdline, BOOL quiet)
 

Function Documentation

◆ DllMain()

BOOL WINAPI DllMain ( HINSTANCE  hinstDLL,
DWORD  fdwReason,
LPVOID  lpvReserved 
)

Definition at line 34 of file loadperf_main.c.

35{
36 TRACE("(0x%p, %d, %p)\n",hinstDLL,fdwReason,lpvReserved);
37
38 switch(fdwReason)
39 {
40 case DLL_WINE_PREATTACH:
41 return FALSE; /* prefer native version */
44 break;
45 }
46
47 return TRUE;
48}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
static IN DWORD IN LPVOID lpvReserved
#define TRACE(s)
Definition: solgame.cpp:4

◆ InstallPerfDllA()

DWORD WINAPI InstallPerfDllA ( LPCSTR  computer,
LPCSTR  ini,
ULONG_PTR  flags 
)

Definition at line 65 of file loadperf_main.c.

66{
67 DWORD ret;
68 LPWSTR computerW = NULL, iniW = NULL;
69
70 if (computer && !(computerW = strdupAW(computer))) return ERROR_OUTOFMEMORY;
71 if (ini && !(iniW = strdupAW(ini)))
72 {
73 HeapFree(GetProcessHeap(), 0, computerW);
74 return ERROR_OUTOFMEMORY;
75 }
76
77 ret = InstallPerfDllW(computerW, iniW, flags);
78
79 HeapFree(GetProcessHeap(), 0, computerW);
80 HeapFree(GetProcessHeap(), 0, iniW);
81
82 return ret;
83}
#define ERROR_OUTOFMEMORY
Definition: deptool.c:13
#define NULL
Definition: types.h:112
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735
unsigned long DWORD
Definition: ntddk_ex.h:95
GLbitfield flags
Definition: glext.h:7161
DWORD WINAPI InstallPerfDllW(LPCWSTR computer, LPCWSTR ini, ULONG_PTR flags)
Definition: loadperf_main.c:88
static WCHAR * strdupAW(const char *str)
Definition: loadperf_main.c:50
TConfig ini
Definition: tnconfig.cpp:45
int ret
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ InstallPerfDllW()

DWORD WINAPI InstallPerfDllW ( LPCWSTR  computer,
LPCWSTR  ini,
ULONG_PTR  flags 
)

Definition at line 88 of file loadperf_main.c.

89{
90 FIXME("(%s, %s, %lx)\n", debugstr_w(computer), debugstr_w(ini), flags);
91 return ERROR_SUCCESS;
92}
#define FIXME(fmt,...)
Definition: debug.h:111
#define ERROR_SUCCESS
Definition: deptool.c:10
#define debugstr_w
Definition: kernel32.h:32

Referenced by InstallPerfDllA().

◆ LoadPerfCounterTextStringsA()

DWORD WINAPI LoadPerfCounterTextStringsA ( LPCSTR  cmdline,
BOOL  quiet 
)

Definition at line 100 of file loadperf_main.c.

101{
102 DWORD ret;
103 LPWSTR cmdlineW = NULL;
104
105 if (cmdline && !(cmdlineW = strdupAW(cmdline))) return ERROR_OUTOFMEMORY;
106
108
109 HeapFree(GetProcessHeap(), 0, cmdlineW);
110
111 return ret;
112}
DWORD WINAPI LoadPerfCounterTextStringsW(LPCWSTR cmdline, BOOL quiet)
TCHAR * cmdline
Definition: stretchblt.cpp:32
static int quiet
Definition: xmllint.c:162

◆ LoadPerfCounterTextStringsW()

DWORD WINAPI LoadPerfCounterTextStringsW ( LPCWSTR  cmdline,
BOOL  quiet 
)

Definition at line 122 of file loadperf_main.c.

123{
124 FIXME("(%s, %d): stub\n", debugstr_w(cmdline), quiet);
125
126 return ERROR_SUCCESS;
127}

Referenced by LoadPerfCounterTextStringsA(), and wmain().

◆ strdupAW()

static WCHAR * strdupAW ( const char str)
static

Definition at line 50 of file loadperf_main.c.

51{
52 WCHAR *ret = NULL;
53 if (str)
54 {
56 if (!(ret = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR)))) return NULL;
58 }
59 return ret;
60}
#define CP_ACP
Definition: compat.h:109
#define HeapAlloc
Definition: compat.h:733
#define MultiByteToWideChar
Definition: compat.h:110
GLenum GLsizei len
Definition: glext.h:6722
const WCHAR * str
int32_t INT
Definition: typedefs.h:58
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by InstallPerfDllA(), LoadPerfCounterTextStringsA(), and UnloadPerfCounterTextStringsA().

◆ UnloadPerfCounterTextStringsA()

DWORD WINAPI UnloadPerfCounterTextStringsA ( LPCSTR  cmdline,
BOOL  quiet 
)

Definition at line 135 of file loadperf_main.c.

136{
137 DWORD ret;
138 LPWSTR cmdlineW = NULL;
139
140 if (cmdline && !(cmdlineW = strdupAW(cmdline))) return ERROR_OUTOFMEMORY;
141
143
144 HeapFree(GetProcessHeap(), 0, cmdlineW);
145
146 return ret;
147}
DWORD WINAPI UnloadPerfCounterTextStringsW(LPCWSTR cmdline, BOOL quiet)

◆ UnloadPerfCounterTextStringsW()

DWORD WINAPI UnloadPerfCounterTextStringsW ( LPCWSTR  cmdline,
BOOL  quiet 
)

Definition at line 157 of file loadperf_main.c.

158{
159 FIXME("(%s, %d): stub\n", debugstr_w(cmdline), quiet);
160
161 return ERROR_SUCCESS;
162}

Referenced by UnloadPerfCounterTextStringsA().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( loadperf  )