On 8/3/16 11:54 AM, Sebastian Lackner wrote:
On 29.07.2016 21:02, Aric Stewart wrote:
v2: Pass a proper driver name to IoCreateDriver and use generated keyname v3: Remove global driver_name
The two patches are not longer a set as each is independent of the other
Signed-off-by: Aric Stewart aric@codeweavers.com
programs/winedevice/device.c | 179 +++++++++++++++++++++++-------------------- 1 file changed, 94 insertions(+), 85 deletions(-)
0002-programs-winedevice.exe-Use-IoCreateDriver-and-IoDelet.txt
diff --git a/programs/winedevice/device.c b/programs/winedevice/device.c index 94132ed..df0fac3 100644 --- a/programs/winedevice/device.c +++ b/programs/winedevice/device.c @@ -40,11 +40,10 @@ WINE_DECLARE_DEBUG_CHANNEL(relay);
extern NTSTATUS CDECL wine_ntoskrnl_main_loop( HANDLE stop_event );
-static WCHAR *driver_name; static SERVICE_STATUS_HANDLE service_handle; static HANDLE stop_event; -static DRIVER_OBJECT driver_obj; -static DRIVER_EXTENSION driver_extension; +static DRIVER_OBJECT *driver_obj; +static HMODULE driver_module;
How do you plan to adjust this when multiple drivers are loaded? Its still not clear to me, unfortunately. The static variables have to go away sooner or later. ;)
My plan was to replace this with a list (or maybe rb_tree) of structures containing this information keyed from the driver that is being loaded. So there would be a single global list(tree).
-aric