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
9bbf3f90
Commit
9bbf3f90
authored
May 12, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
May 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Moved GetModuleFileNameEx[AW] to kernel32.
parent
e6dd213d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
58 deletions
+59
-58
kernel32.spec
dlls/kernel32/kernel32.spec
+2
-0
module.c
dlls/kernel32/module.c
+55
-0
psapi.spec
dlls/psapi/psapi.spec
+2
-2
psapi_main.c
dlls/psapi/psapi_main.c
+0
-56
No files found.
dlls/kernel32/kernel32.spec
View file @
9bbf3f90
...
@@ -774,6 +774,8 @@
...
@@ -774,6 +774,8 @@
@ stdcall K32EnumProcesses(ptr long ptr)
@ stdcall K32EnumProcesses(ptr long ptr)
@ stdcall K32GetModuleBaseNameA(long long ptr long)
@ stdcall K32GetModuleBaseNameA(long long ptr long)
@ stdcall K32GetModuleBaseNameW(long long ptr long)
@ stdcall K32GetModuleBaseNameW(long long ptr long)
@ stdcall K32GetModuleFileNameExA(long long ptr long)
@ stdcall K32GetModuleFileNameExW(long long ptr long)
@ stdcall K32GetProcessMemoryInfo(long ptr long)
@ stdcall K32GetProcessMemoryInfo(long ptr long)
@ stdcall K32QueryWorkingSet(long ptr long)
@ stdcall K32QueryWorkingSet(long ptr long)
@ stdcall K32QueryWorkingSetEx(long ptr long)
@ stdcall K32QueryWorkingSetEx(long ptr long)
...
...
dlls/kernel32/module.c
View file @
9bbf3f90
...
@@ -1228,6 +1228,61 @@ DWORD WINAPI K32GetModuleBaseNameA(HANDLE process, HMODULE module,
...
@@ -1228,6 +1228,61 @@ DWORD WINAPI K32GetModuleBaseNameA(HANDLE process, HMODULE module,
return
ret
;
return
ret
;
}
}
/***********************************************************************
* K32GetModuleFileNameExW (KERNEL32.@)
*/
DWORD
WINAPI
K32GetModuleFileNameExW
(
HANDLE
process
,
HMODULE
module
,
LPWSTR
file_name
,
DWORD
size
)
{
LDR_MODULE
ldr_module
;
if
(
!
get_ldr_module
(
process
,
module
,
&
ldr_module
))
return
0
;
size
=
min
(
ldr_module
.
FullDllName
.
Length
/
sizeof
(
WCHAR
),
size
);
if
(
!
ReadProcessMemory
(
process
,
ldr_module
.
FullDllName
.
Buffer
,
file_name
,
size
*
sizeof
(
WCHAR
),
NULL
))
return
0
;
file_name
[
size
]
=
0
;
return
size
;
}
/***********************************************************************
* K32GetModuleFileNameExA (KERNEL32.@)
*/
DWORD
WINAPI
K32GetModuleFileNameExA
(
HANDLE
process
,
HMODULE
module
,
LPSTR
file_name
,
DWORD
size
)
{
WCHAR
*
ptr
;
TRACE
(
"(hProcess=%p, hModule=%p, %p, %d)
\n
"
,
process
,
module
,
file_name
,
size
);
if
(
!
file_name
||
!
size
)
return
0
;
if
(
process
==
GetCurrentProcess
()
)
{
DWORD
len
=
GetModuleFileNameA
(
module
,
file_name
,
size
);
if
(
size
)
file_name
[
size
-
1
]
=
'\0'
;
return
len
;
}
if
(
!
(
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
WCHAR
))))
return
0
;
if
(
!
K32GetModuleFileNameExW
(
process
,
module
,
ptr
,
size
))
{
file_name
[
0
]
=
'\0'
;
}
else
{
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
ptr
,
-
1
,
file_name
,
size
,
NULL
,
NULL
))
file_name
[
size
-
1
]
=
0
;
}
HeapFree
(
GetProcessHeap
(),
0
,
ptr
);
return
strlen
(
file_name
);
}
#ifdef __i386__
#ifdef __i386__
/***********************************************************************
/***********************************************************************
...
...
dlls/psapi/psapi.spec
View file @
9bbf3f90
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
@ stdcall GetMappedFileNameW(long ptr ptr long)
@ stdcall GetMappedFileNameW(long ptr ptr long)
@ stdcall GetModuleBaseNameA(long long ptr long) kernel32.K32GetModuleBaseNameA
@ stdcall GetModuleBaseNameA(long long ptr long) kernel32.K32GetModuleBaseNameA
@ stdcall GetModuleBaseNameW(long long ptr long) kernel32.K32GetModuleBaseNameW
@ stdcall GetModuleBaseNameW(long long ptr long) kernel32.K32GetModuleBaseNameW
@ stdcall GetModuleFileNameExA(long long ptr long)
@ stdcall GetModuleFileNameExA(long long ptr long)
kernel32.K32GetModuleFileNameExA
@ stdcall GetModuleFileNameExW(long long ptr long)
@ stdcall GetModuleFileNameExW(long long ptr long)
kernel32.K32GetModuleFileNameExW
@ stdcall GetModuleInformation(long long ptr long)
@ stdcall GetModuleInformation(long long ptr long)
@ stdcall GetPerformanceInfo(ptr long)
@ stdcall GetPerformanceInfo(ptr long)
@ stdcall GetProcessImageFileNameA(long ptr long) kernel32.K32GetProcessImageFileNameA
@ stdcall GetProcessImageFileNameA(long ptr long) kernel32.K32GetProcessImageFileNameA
...
...
dlls/psapi/psapi_main.c
View file @
9bbf3f90
...
@@ -263,62 +263,6 @@ DWORD WINAPI GetMappedFileNameW(HANDLE hProcess, LPVOID lpv, LPWSTR lpFilename,
...
@@ -263,62 +263,6 @@ DWORD WINAPI GetMappedFileNameW(HANDLE hProcess, LPVOID lpv, LPWSTR lpFilename,
}
}
/***********************************************************************
/***********************************************************************
* GetModuleFileNameExA (PSAPI.@)
*/
DWORD
WINAPI
GetModuleFileNameExA
(
HANDLE
hProcess
,
HMODULE
hModule
,
LPSTR
lpFileName
,
DWORD
nSize
)
{
WCHAR
*
ptr
;
TRACE
(
"(hProcess=%p, hModule=%p, %p, %d)
\n
"
,
hProcess
,
hModule
,
lpFileName
,
nSize
);
if
(
!
lpFileName
||
!
nSize
)
return
0
;
if
(
hProcess
==
GetCurrentProcess
()
)
{
DWORD
len
=
GetModuleFileNameA
(
hModule
,
lpFileName
,
nSize
);
if
(
nSize
)
lpFileName
[
nSize
-
1
]
=
'\0'
;
return
len
;
}
if
(
!
(
ptr
=
HeapAlloc
(
GetProcessHeap
(),
0
,
nSize
*
sizeof
(
WCHAR
))))
return
0
;
if
(
!
GetModuleFileNameExW
(
hProcess
,
hModule
,
ptr
,
nSize
))
{
lpFileName
[
0
]
=
'\0'
;
}
else
{
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
ptr
,
-
1
,
lpFileName
,
nSize
,
NULL
,
NULL
))
lpFileName
[
nSize
-
1
]
=
0
;
}
HeapFree
(
GetProcessHeap
(),
0
,
ptr
);
return
strlen
(
lpFileName
);
}
/***********************************************************************
* GetModuleFileNameExW (PSAPI.@)
*/
DWORD
WINAPI
GetModuleFileNameExW
(
HANDLE
hProcess
,
HMODULE
hModule
,
LPWSTR
lpFileName
,
DWORD
nSize
)
{
LDR_MODULE
LdrModule
;
if
(
!
PSAPI_GetLdrModule
(
hProcess
,
hModule
,
&
LdrModule
))
return
0
;
nSize
=
min
(
LdrModule
.
FullDllName
.
Length
/
sizeof
(
WCHAR
),
nSize
);
if
(
!
ReadProcessMemory
(
hProcess
,
LdrModule
.
FullDllName
.
Buffer
,
lpFileName
,
nSize
*
sizeof
(
WCHAR
),
NULL
))
return
0
;
lpFileName
[
nSize
]
=
0
;
return
nSize
;
}
/***********************************************************************
* GetModuleInformation (PSAPI.@)
* GetModuleInformation (PSAPI.@)
*/
*/
BOOL
WINAPI
GetModuleInformation
(
HANDLE
hProcess
,
HMODULE
hModule
,
BOOL
WINAPI
GetModuleInformation
(
HANDLE
hProcess
,
HMODULE
hModule
,
...
...
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