Allow for Minidriver registration --- configure | 2 + configure.ac | 1 + dlls/hidclass.sys/Makefile.in | 8 ++++ dlls/hidclass.sys/hid.h | 53 +++++++++++++++++++++++++ dlls/hidclass.sys/hidclass.sys.spec | 2 + dlls/hidclass.sys/main.c | 78 +++++++++++++++++++++++++++++++++++++ loader/wine.inf.in | 13 +++++++ 7 files changed, 157 insertions(+) create mode 100644 dlls/hidclass.sys/Makefile.in create mode 100644 dlls/hidclass.sys/hid.h create mode 100644 dlls/hidclass.sys/hidclass.sys.spec create mode 100644 dlls/hidclass.sys/main.c
I'm assuming you know that hidclass.sys is just library on Windows and intentionally made your version its own service to simplify things. If that's not true I can elaborate.
On 2015-06-22 03:24, Aric Stewart wrote:
--- /dev/null +++ b/dlls/hidclass.sys/main.c
+NTSTATUS WINAPI HidRegisterMinidriver(PHID_MINIDRIVER_REGISTRATION registration) +{
- minidriver *driver;
- driver = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*driver));
- if (!driver)
return STATUS_NO_MEMORY;
- driver->minidriver = registration;
It's a bit unusual to assume that the registration structure will live longer than the scope of this function. Fine for the built-in driver you have but this would certainly have to copy the members if it were to support "real" minidrivers.
- list_add_tail(&minidriver_list, &driver->entry);
- return STATUS_SUCCESS;
+}
On 6/22/15 5:44 AM, Thomas Faber wrote:
I'm assuming you know that hidclass.sys is just library on Windows and intentionally made your version its own service to simplify things. If that's not true I can elaborate.
I was just starting to come to the awareness of this, thanks for confirming it, and was debating if i wanted to change my architecture a bit.
I intentionally made its own service to handle the builtin minidrivers and help get around the lack of any Plug-and-play system. But I was trying to explore if there was an easy way to make it both so that future possible "real" minidrivers could load it as expected.
I think there is. But have not done the work in that regard as there are probably many many other problems with "real" minidrivers anyway.
-aric