[PATCH v2 3/8] wineplugplay.sys: Implement loading and removing devices

Aric Stewart aric at codeweavers.com
Mon Aug 22 09:19:50 CDT 2016


v2: Dynamically load drivers on demand

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 | 210 ++++++++++++++++++++++++++++++++++++
 2 files changed, 211 insertions(+)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: v2-0003-wineplugplay.sys-Implement-loading-and-removing-dev.txt
Type: text/x-patch
Size: 7435 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20160822/7efbf175/attachment.bin>


More information about the wine-patches mailing list