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
bd00dede
Commit
bd00dede
authored
Mar 15, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 16, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntoskrnl.exe: Implement IoOpenDeviceRegistryKey().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
226c3196
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
ntoskrnl.exe.spec
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
+1
-1
pnp.c
dlls/ntoskrnl.exe/pnp.c
+29
-0
wdm.h
include/ddk/wdm.h
+1
-0
No files found.
dlls/ntoskrnl.exe/ntoskrnl.exe.spec
View file @
bd00dede
...
...
@@ -423,7 +423,7 @@
@ stdcall IoIsWdmVersionAvailable(long long)
@ stub IoMakeAssociatedIrp
@ stub IoOpenDeviceInterfaceRegistryKey
@ st
ub IoOpenDeviceRegistryKey
@ st
dcall IoOpenDeviceRegistryKey(ptr long long ptr)
@ stub IoPageRead
@ stub IoPnPDeliverServicePowerNotification
@ stdcall IoQueryDeviceDescription(ptr ptr ptr ptr ptr ptr ptr ptr)
...
...
dlls/ntoskrnl.exe/pnp.c
View file @
bd00dede
...
...
@@ -845,6 +845,35 @@ NTSTATUS WINAPI IoRegisterDeviceInterface(DEVICE_OBJECT *device, const GUID *cla
}
/***********************************************************************
* IoOpenDeviceRegistryKey (NTOSKRNL.EXE.@)
*/
NTSTATUS
WINAPI
IoOpenDeviceRegistryKey
(
DEVICE_OBJECT
*
device
,
ULONG
type
,
ACCESS_MASK
access
,
HANDLE
*
key
)
{
SP_DEVINFO_DATA
sp_device
=
{
sizeof
(
sp_device
)};
WCHAR
device_instance_id
[
MAX_DEVICE_ID_LEN
];
NTSTATUS
status
;
HDEVINFO
set
;
TRACE
(
"device %p, type %#x, access %#x, key %p.
\n
"
,
device
,
type
,
access
,
key
);
if
((
status
=
get_device_instance_id
(
device
,
device_instance_id
)))
{
ERR
(
"Failed to get device instance ID, error %#x.
\n
"
,
status
);
return
status
;
}
set
=
SetupDiCreateDeviceInfoList
(
&
GUID_NULL
,
NULL
);
SetupDiOpenDeviceInfoW
(
set
,
device_instance_id
,
NULL
,
0
,
&
sp_device
);
*
key
=
SetupDiOpenDevRegKey
(
set
,
&
sp_device
,
DICS_FLAG_GLOBAL
,
0
,
type
,
access
);
SetupDiDestroyDeviceInfoList
(
set
);
if
(
*
key
==
INVALID_HANDLE_VALUE
)
return
GetLastError
();
return
STATUS_SUCCESS
;
}
/***********************************************************************
* PoSetPowerState (NTOSKRNL.EXE.@)
*/
POWER_STATE
WINAPI
PoSetPowerState
(
DEVICE_OBJECT
*
device
,
POWER_STATE_TYPE
type
,
POWER_STATE
state
)
...
...
include/ddk/wdm.h
View file @
bd00dede
...
...
@@ -1607,6 +1607,7 @@ void WINAPI IoGetStackLimits(ULONG_PTR*,ULONG_PTR*);
void
WINAPI
IoInitializeIrp
(
IRP
*
,
USHORT
,
CCHAR
);
VOID
WINAPI
IoInitializeRemoveLockEx
(
PIO_REMOVE_LOCK
,
ULONG
,
ULONG
,
ULONG
,
ULONG
);
void
WINAPI
IoInvalidateDeviceRelations
(
PDEVICE_OBJECT
,
DEVICE_RELATION_TYPE
);
NTSTATUS
WINAPI
IoOpenDeviceRegistryKey
(
DEVICE_OBJECT
*
,
ULONG
,
ACCESS_MASK
,
HANDLE
*
);
void
WINAPI
IoQueueWorkItem
(
PIO_WORKITEM
,
PIO_WORKITEM_ROUTINE
,
WORK_QUEUE_TYPE
,
void
*
);
NTSTATUS
WINAPI
IoRegisterDeviceInterface
(
PDEVICE_OBJECT
,
const
GUID
*
,
PUNICODE_STRING
,
PUNICODE_STRING
);
void
WINAPI
IoReleaseCancelSpinLock
(
KIRQL
);
...
...
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