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
4defc2b5
Commit
4defc2b5
authored
Nov 17, 2008
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Nov 20, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Implement MmGetSystemRoutineAddress.
parent
bf92d683
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
1 deletion
+31
-1
ntoskrnl.c
dlls/ntoskrnl.exe/ntoskrnl.c
+30
-0
ntoskrnl.exe.spec
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+1
-1
No files found.
dlls/ntoskrnl.exe/ntoskrnl.c
View file @
4defc2b5
...
...
@@ -1071,6 +1071,36 @@ NTSTATUS WINAPI PsSetCreateProcessNotifyRoutine( PCREATE_PROCESS_NOTIFY_ROUTINE
return
STATUS_SUCCESS
;
}
/***********************************************************************
* MmGetSystemRoutineAddress (NTOSKRNL.EXE.@)
*/
PVOID
WINAPI
MmGetSystemRoutineAddress
(
PUNICODE_STRING
SystemRoutineName
)
{
HMODULE
hMod
;
STRING
routineNameA
;
PVOID
pFunc
=
NULL
;
static
const
WCHAR
ntoskrnlW
[]
=
{
'n'
,
't'
,
'o'
,
's'
,
'k'
,
'r'
,
'n'
,
'l'
,
'.'
,
'e'
,
'x'
,
'e'
,
0
};
static
const
WCHAR
halW
[]
=
{
'h'
,
'a'
,
'l'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
if
(
!
SystemRoutineName
)
return
NULL
;
if
(
RtlUnicodeStringToAnsiString
(
&
routineNameA
,
SystemRoutineName
,
TRUE
)
==
STATUS_SUCCESS
)
{
/* We only support functions exported from ntoskrnl.exe or hal.dll */
hMod
=
GetModuleHandleW
(
ntoskrnlW
);
pFunc
=
GetProcAddress
(
hMod
,
routineNameA
.
Buffer
);
if
(
!
pFunc
)
{
hMod
=
GetModuleHandleW
(
halW
);
if
(
hMod
)
pFunc
=
GetProcAddress
(
hMod
,
routineNameA
.
Buffer
);
}
RtlFreeAnsiString
(
&
routineNameA
);
}
TRACE
(
"%s -> %p
\n
"
,
debugstr_us
(
SystemRoutineName
),
pFunc
);
return
pFunc
;
}
/*****************************************************
* DllMain
...
...
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
View file @
4defc2b5
...
...
@@ -675,7 +675,7 @@
@ stub MmFreePagesFromMdl
@ stub MmGetPhysicalAddress
@ stub MmGetPhysicalMemoryRanges
@ st
ub MmGetSystemRoutineAddress
@ st
dcall MmGetSystemRoutineAddress(ptr)
@ stub MmGetVirtualForPhysical
@ stub MmGrowKernelStack
@ stub MmHighestUserAddress
...
...
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