Hal and functions in setupapi

Damjan Jovanovic dj015 at yahoo.com
Wed Jun 7 05:43:49 CDT 2006

--- Christian Gmeiner
<christian.gmeiner at students.fh-vorarlberg.ac.at>

> Hi all...
> at the momemt i am reading into functions to get
> some informations about
> e.g. cdrom drives. At the moment
> i am loking into SetupDiGetClassDevsW to support
> later USB devices.
> My overall goal is it to get Line 6 software for my
> guitart effect board
> (USB) working with wine.

I would be very interested in getting USB working on
wine, and I've already had a deep long look at both
setupapi's device installation API and HAL. Can we
work together on this?

> Now i thought about a way to get all informations
> about a singe cdrom
> device. And i thought that I could use HAL perfectly
> for this.
> I thought about this way of doing it:
> Add hal.c file to setupapi dll, which contains
> function to get infromations
> about all needed hardware. This should work very
> nicly
> for this case. But as I want to programm
> RegisterDeviceNotification also we
> need a central way to handle hal stuff.

RegisterDeviceNofications() is only necessary for
services (which wine poorly supports anyway) - you can
always cheat by creating an invisible top-level window
to receive WM_DEVICECHANGE messages.

> So how should I go on? Use some own hal.c in
> setupapi or add an global wine
> way to interact with hal?

That's not anything close to how SETUPAPI works on
Windows. Download devinst.c from ReactOS's SETUPAPI
and have a look. Some SETUPAPI device installer
functions delegate to CFGMGR32.DLL and those either to
the Windows registry or to even worse things
(undocumented RPCs to the UMPNPMGR service, some of
which are implemented by system calls...).

In the case of CDROM enumeration, rather use wine's
internal drive list and pull CDROMs from there. In the
case of USB, to say it needs a lot of work is an

> Thanks,
> Christian

Let me know what your plans are with USB so maybe we
can work together on it.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

More information about the wine-devel mailing list