HiderDevice: Introduce hider device creation and registration
Signed-off-by: Kirill Moizik <kirill@daynix.com> Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
This commit is contained in:
parent
2f9f80cd74
commit
27a04f8d55
8 changed files with 250 additions and 3 deletions
|
|
@ -366,12 +366,29 @@ NTSTATUS CUsbDkControlDevice::Create(WDFDRIVER Driver)
|
|||
attr.EvtCleanupCallback = ContextCleanup;
|
||||
|
||||
status = CWdfControlDevice::Create(DeviceInit, attr);
|
||||
if (NT_SUCCESS(status))
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
UsbDkControlGetContext(m_Device)->UsbDkControl = this;
|
||||
return status;
|
||||
}
|
||||
|
||||
return status;
|
||||
UsbDkControlGetContext(m_Device)->UsbDkControl = this;
|
||||
|
||||
CObjHolder<CUsbDkHiderDevice> HiderDevice(new CUsbDkHiderDevice());
|
||||
if (!HiderDevice)
|
||||
{
|
||||
TraceEvents(TRACE_LEVEL_ERROR, TRACE_CONTROLDEVICE, "%!FUNC! Hider device allocation failed");
|
||||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
}
|
||||
|
||||
status = HiderDevice->Create(Driver);
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
m_HiderDevice = HiderDevice.detach();
|
||||
|
||||
return m_HiderDevice->Register();
|
||||
}
|
||||
|
||||
NTSTATUS CUsbDkControlDevice::Register()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue