Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0dd925b0
Commit
0dd925b0
authored
Jan 23, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Jan 23, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loadperf: Add stub implementations for InstallPerfDllA/W.
parent
2409e33f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
16 deletions
+52
-16
loadperf.spec
dlls/loadperf/loadperf.spec
+2
-2
loadperf_main.c
dlls/loadperf/loadperf_main.c
+46
-14
loadperf.h
include/loadperf.h
+4
-0
No files found.
dlls/loadperf/loadperf.spec
View file @
0dd925b0
@ stub BackupPerfRegistryToFileW
@ st
ub InstallPerfDllA
@ st
ub InstallPerfDllW
@ st
dcall InstallPerfDllA(str str ptr)
@ st
dcall InstallPerfDllW(wstr wstr ptr)
@ stub LoadMofFromInstalledServiceA
@ stub LoadMofFromInstalledServiceW
@ stdcall LoadPerfCounterTextStringsA(str long)
...
...
dlls/loadperf/loadperf_main.c
View file @
0dd925b0
...
...
@@ -50,6 +50,50 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return
TRUE
;
}
static
WCHAR
*
strdupAW
(
const
char
*
str
)
{
WCHAR
*
ret
=
NULL
;
if
(
str
)
{
INT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
NULL
,
0
);
if
(
!
(
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
))))
return
NULL
;
MultiByteToWideChar
(
CP_ACP
,
0
,
str
,
-
1
,
ret
,
len
);
}
return
ret
;
}
/*************************************************************
* InstallPerfDllA (loadperf.@)
*/
DWORD
WINAPI
InstallPerfDllA
(
LPCSTR
computer
,
LPCSTR
ini
,
ULONG_PTR
flags
)
{
DWORD
ret
;
LPWSTR
computerW
=
NULL
,
iniW
=
NULL
;
if
(
computer
&&
!
(
computerW
=
strdupAW
(
computer
)))
return
ERROR_OUTOFMEMORY
;
if
(
ini
&&
!
(
iniW
=
strdupAW
(
ini
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
computerW
);
return
ERROR_OUTOFMEMORY
;
}
ret
=
InstallPerfDllW
(
computerW
,
iniW
,
flags
);
HeapFree
(
GetProcessHeap
(),
0
,
computerW
);
HeapFree
(
GetProcessHeap
(),
0
,
iniW
);
return
ret
;
}
/*************************************************************
* InstallPerfDllW (loadperf.@)
*/
DWORD
WINAPI
InstallPerfDllW
(
LPCWSTR
computer
,
LPCWSTR
ini
,
ULONG_PTR
flags
)
{
FIXME
(
"(%s, %s, %lx)
\n
"
,
debugstr_w
(
computer
),
debugstr_w
(
ini
),
flags
);
return
ERROR_SUCCESS
;
}
/*************************************************************
* LoadPerfCounterTextStringsA (loadperf.@)
*
...
...
@@ -61,13 +105,7 @@ DWORD WINAPI LoadPerfCounterTextStringsA(LPCSTR cmdline, BOOL quiet)
DWORD
ret
;
LPWSTR
cmdlineW
=
NULL
;
if
(
cmdline
)
{
INT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
cmdline
,
-
1
,
NULL
,
0
);
cmdlineW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
cmdlineW
)
return
ERROR_NOT_ENOUGH_MEMORY
;
MultiByteToWideChar
(
CP_ACP
,
0
,
cmdline
,
-
1
,
cmdlineW
,
len
);
}
if
(
cmdline
&&
!
(
cmdlineW
=
strdupAW
(
cmdline
)))
return
ERROR_OUTOFMEMORY
;
ret
=
LoadPerfCounterTextStringsW
(
cmdlineW
,
quiet
);
...
...
@@ -102,13 +140,7 @@ DWORD WINAPI UnloadPerfCounterTextStringsA(LPCSTR cmdline, BOOL verbose)
DWORD
ret
;
LPWSTR
cmdlineW
=
NULL
;
if
(
cmdline
)
{
INT
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
cmdline
,
-
1
,
NULL
,
0
);
cmdlineW
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
cmdlineW
)
return
ERROR_NOT_ENOUGH_MEMORY
;
MultiByteToWideChar
(
CP_ACP
,
0
,
cmdline
,
-
1
,
cmdlineW
,
len
);
}
if
(
cmdline
&&
!
(
cmdlineW
=
strdupAW
(
cmdline
)))
return
ERROR_OUTOFMEMORY
;
ret
=
UnloadPerfCounterTextStringsW
(
cmdlineW
,
verbose
);
...
...
include/loadperf.h
View file @
0dd925b0
...
...
@@ -23,6 +23,10 @@
extern
"C"
{
#endif
DWORD
WINAPI
InstallPerfDllA
(
LPCSTR
,
LPCSTR
,
ULONG_PTR
);
DWORD
WINAPI
InstallPerfDllW
(
LPCWSTR
,
LPCWSTR
,
ULONG_PTR
);
#define InstallPerfDll WINELIB_NAME_AW(InstallPerfDll);
DWORD
WINAPI
LoadPerfCounterTextStringsA
(
LPCSTR
,
BOOL
);
DWORD
WINAPI
LoadPerfCounterTextStringsW
(
LPCWSTR
,
BOOL
);
#define LoadPerfCounterTextStrings WINELIB_NAME_AW(LoadPerfCounterTextStrings)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment