I am looking to fix a bug causing serial ports to not show up in some applications. The problem is due to missing registry entries for the serial ports. I know what entries need to be created but I don't think they should go in wine.inf. They should get created dynamically, preferably on each run, based on what currently exists in .wine/dosdevices/
The bug I am working on is 9902 (http://bugs.winehq.org/show_bug.cgi?id=9902).
Does anyone have any insight on where I should start looking to implement this? Implementation suggestions? In the bug, Juan Lang made the suggestion that "Explorer's hal.c should be extended to create new devices for all the ports it finds, using SetupDiCreateDeviceInfo followed by SetupDiRegisterDeviceInfo. For some devices it should also call SetupDiCreateDeviceInterface to register a particular interface." I've looked in programs/explorer/hal.c and I am not sure where to begin hooking something like that in.
It was also suggested in #winehackers that this could go in the same place that other hardware like disk drives are detected and configured. I am not sure where that would be either or if that is the same as hal.c.
I am new to wine development to please feel free to over explain.
Thanks,
On Sunday 13 January 2008 06:19:06 Forrest Samuels wrote:
Does anyone have any insight on where I should start looking to implement this? Implementation suggestions? In the bug, Juan Lang made the suggestion that "Explorer's hal.c should be extended to create new devices for all the ports it finds, using SetupDiCreateDeviceInfo followed by SetupDiRegisterDeviceInfo. For some devices it should also call SetupDiCreateDeviceInterface to register a particular interface." I've looked in programs/explorer/hal.c and I am not sure where to begin hooking something like that in.
I'd like to know where and when SetupDiRegisterDeviceInfo gets called on Windows. I know that Alexandre is planning to move drive detection from explorer to mountmgr.sys, serial devices will probably end up in serial.sys or something like that. Perhaps this could work by making the driver itself do device registration.
-Hans
On Jan 13, 2008 8:39 AM, Hans Leidekker hans@it.vu.nl wrote:
On Sunday 13 January 2008 06:19:06 Forrest Samuels wrote:
Does anyone have any insight on where I should start looking to implement this? Implementation suggestions? In the bug, Juan Lang made the suggestion that "Explorer's hal.c should be extended to create new devices for all the ports it finds, using SetupDiCreateDeviceInfo followed by SetupDiRegisterDeviceInfo. For some devices it should also call SetupDiCreateDeviceInterface to register a particular interface." I've looked in programs/explorer/hal.c and I am not sure where to begin hooking something like that in.
I'd like to know where and when SetupDiRegisterDeviceInfo gets called on Windows. I know that Alexandre is planning to move drive detection from explorer to mountmgr.sys, serial devices will probably end up in serial.sys or something like that. Perhaps this could work by making the driver itself do device registration.
-Hans
Is there a time frame for the mountmgr.sys changes? Do I need to wait until Alexandre makes those changes or could I start working on this fix elsewhere and just move it later. I'm not really sure where to start and would love a little direction to get started. I don't think this is taking on too much for my first work on wine but I may be wrong on that too. Thanks for the help.
On Jan 14, 2008 9:17 AM, Forrest Samuels forrest@alumni.ncsu.edu wrote:
On Jan 13, 2008 8:39 AM, Hans Leidekker hans@it.vu.nl wrote:
On Sunday 13 January 2008 06:19:06 Forrest Samuels wrote:
Does anyone have any insight on where I should start looking to implement this? Implementation suggestions? In the bug, Juan Lang made the suggestion that "Explorer's hal.c should be extended to create new devices for all the ports it finds, using SetupDiCreateDeviceInfo followed by SetupDiRegisterDeviceInfo. For some devices it should also call SetupDiCreateDeviceInterface to register a particular interface." I've looked in programs/explorer/hal.c and I am not sure where to begin hooking something like that in.
I'd like to know where and when SetupDiRegisterDeviceInfo gets called on Windows. I know that Alexandre is planning to move drive detection from explorer to mountmgr.sys, serial devices will probably end up in serial.sys or something like that. Perhaps this could work by making the driver itself do device registration.
-Hans
Is there a time frame for the mountmgr.sys changes? Do I need to wait until Alexandre makes those changes or could I start working on this fix elsewhere and just move it later. I'm not really sure where to start and would love a little direction to get started. I don't think this is taking on too much for my first work on wine but I may be wrong on that too. Thanks for the help.
To be honest, you're greatly underestimating the difficulty of the task. The fact that you have to ask such questions should alert you to this.
On Monday 14 January 2008 18:46:36 James Hawkins wrote:
Is there a time frame for the mountmgr.sys changes? Do I need to wait until Alexandre makes those changes or could I start working on this fix elsewhere and just move it later. I'm not really sure where to start and would love a little direction to get started. I don't think this is taking on too much for my first work on wine but I may be wrong on that too. Thanks for the help.
To be honest, you're greatly underestimating the difficulty of the task. The fact that you have to ask such questions should alert you to this.
Yeah, the infrastructural problems are way beyond beginner level, but you could simply ignore those and write some code that registers a serial device i.e. writes registry keys below HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum
MSDN tells me there is something called the plug and play manager which is responsible for registering devices. We have no equivalent in Wine but we may get away with fake data for serial devices or find some other way to retrieve it.
-Hans