[2/11]hidclass.sys: add a wine native hid device driver service

Thomas Faber thomas.faber at reactos.org
Mon Jun 22 05:44:06 CDT 2015


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;
> +}





More information about the wine-devel mailing list