[PATCH 03/13] wineplugplay.sys: Implement loading and removing devices

Aric Stewart aric at codeweavers.com
Wed Aug 17 08:36:49 CDT 2016


The drivers AddDevice function will be well behaved and call
IoAttachDeviceToDeviceStack. The Plug and Play manager will look at the bus
device after AddDevice and if there is an AttachedDevice then will proceed to
call IRP_MN_START_DEVICE on the attached device. Then a
IRP_MJ_POWER/IRP_MN_SET_POWER to PowerDeviceD0.

Device removal is more simplistic. When the bus driver detects that a
device has been removed then we again make a PNP_IoInvalidateDeviceRelations.
Then the plug and play manager sends a IRP_MN_SURPRISE_REMOVAL followed by a
IRP_MN_REMOVE_DEVICE ioctl to the AttachedDevice.

Signed-off-by: Aric Stewart <aric at codeweavers.com>
---
 dlls/wineplugplay.sys/pnp.h         |   1 +
 dlls/wineplugplay.sys/pnp_manager.c | 201 ++++++++++++++++++++++++++++++++++++
 2 files changed, 202 insertions(+)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-wineplugplay.sys-Implement-loading-and-removing-device.txt
Type: text/x-patch
Size: 7227 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20160817/8e7ed965/attachment-0001.bin>


More information about the wine-patches mailing list