mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-15 23:37:34 +00:00
ntoskrnl.exe: Implement IoOpenDeviceRegistryKey().
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
226c3196e4
commit
bd00dedecd
|
@ -423,7 +423,7 @@
|
||||||
@ stdcall IoIsWdmVersionAvailable(long long)
|
@ stdcall IoIsWdmVersionAvailable(long long)
|
||||||
@ stub IoMakeAssociatedIrp
|
@ stub IoMakeAssociatedIrp
|
||||||
@ stub IoOpenDeviceInterfaceRegistryKey
|
@ stub IoOpenDeviceInterfaceRegistryKey
|
||||||
@ stub IoOpenDeviceRegistryKey
|
@ stdcall IoOpenDeviceRegistryKey(ptr long long ptr)
|
||||||
@ stub IoPageRead
|
@ stub IoPageRead
|
||||||
@ stub IoPnPDeliverServicePowerNotification
|
@ stub IoPnPDeliverServicePowerNotification
|
||||||
@ stdcall IoQueryDeviceDescription(ptr ptr ptr ptr ptr ptr ptr ptr)
|
@ stdcall IoQueryDeviceDescription(ptr ptr ptr ptr ptr ptr ptr ptr)
|
||||||
|
|
|
@ -844,6 +844,35 @@ NTSTATUS WINAPI IoRegisterDeviceInterface(DEVICE_OBJECT *device, const GUID *cla
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* 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.@)
|
* PoSetPowerState (NTOSKRNL.EXE.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1607,6 +1607,7 @@ void WINAPI IoGetStackLimits(ULONG_PTR*,ULONG_PTR*);
|
||||||
void WINAPI IoInitializeIrp(IRP*,USHORT,CCHAR);
|
void WINAPI IoInitializeIrp(IRP*,USHORT,CCHAR);
|
||||||
VOID WINAPI IoInitializeRemoveLockEx(PIO_REMOVE_LOCK,ULONG,ULONG,ULONG,ULONG);
|
VOID WINAPI IoInitializeRemoveLockEx(PIO_REMOVE_LOCK,ULONG,ULONG,ULONG,ULONG);
|
||||||
void WINAPI IoInvalidateDeviceRelations(PDEVICE_OBJECT,DEVICE_RELATION_TYPE);
|
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*);
|
void WINAPI IoQueueWorkItem(PIO_WORKITEM,PIO_WORKITEM_ROUTINE,WORK_QUEUE_TYPE,void*);
|
||||||
NTSTATUS WINAPI IoRegisterDeviceInterface(PDEVICE_OBJECT,const GUID*,PUNICODE_STRING,PUNICODE_STRING);
|
NTSTATUS WINAPI IoRegisterDeviceInterface(PDEVICE_OBJECT,const GUID*,PUNICODE_STRING,PUNICODE_STRING);
|
||||||
void WINAPI IoReleaseCancelSpinLock(KIRQL);
|
void WINAPI IoReleaseCancelSpinLock(KIRQL);
|
||||||
|
|
Loading…
Reference in a new issue