HWman: Difference between revisions

From OS2World.Com Wiki
Jump to navigation Jump to search
mNo edit summary
Line 1: Line 1:
[[image:Hwman.png|thumb]]
HWMAN is a WPS class replacement for HWManager (the OS/2 Hardware Manager).


==Information==
This is an update to the OS/2 "Hardware-Manager" that does 2 things:
hwman is a WPS class replacement for HWManager (the OS/2 Hardware Manager).  
#It removes "WPDevice" nodes from the HW manager device tree if the corresponding RMNode does not exist anymore. This finally fixes the problem that if you remove USB devices they would never be removed from the HWManager device tree. This is not limited to USB devices. Any non existing RM node will lead to removal of the corresponding WPDevice.
#A changed icon for any "bus devices" to show the WPBusDev icon (that's the "3 squares icon" coloured in yellow, red and blue). For example, a "bus device" would be an AGP bus connected to the PCI bus via a bridge (the AGP "bus device" is an addition that Veit Kannegiesser had added to PCIBUS.SNP if it finds an AGP bus).


This is an update to the OS/2 "Hardware-Manager".
==Function==
 
It does 2 things:
1) It removes "WPDevice" nodes from the HW manager device tree if the corresponding RMNode does not exist anymore.
This finally fixes the problem that if you remove USB devices they would never be removed from the HWManager device tree.
This is not limited to USB devices. Any non existing RM node will lead to removal of the corresponding WPDevice.
 
2) As a cosmetic measure, I changed the icon for any "bus devices" to show the WPBusDev icon (that's the "3 squares icon" colored in yellow,red and blue).
For example, a "bus device" would be an AGP bus connected to the PCI bus via a bridge
(the AGP "bus device" is an addition that Veit Kannegiesser had added to PCIBUS.SNP if it finds an AGP bus).
 
[[image:Hwman.png|300px]]
 
==More Information==
WPHwManagerEx class depends on WPHwManager, it is not a 100% replacement of the original class, that's why it is so small. It changes the behavior of WPHwManager while letting WPHwManager do all the rest it has been doing already.
WPHwManagerEx class depends on WPHwManager, it is not a 100% replacement of the original class, that's why it is so small. It changes the behavior of WPHwManager while letting WPHwManager do all the rest it has been doing already.


It still replaces WPHwManager in the way that WPHwManagerEx is invoked before WPHwManager is. Per default WPHwManagerEx will just delegate the call to WPHwManager. With the little exception for when it overrides any WPHwManager methods. In that case, WPHwManagerEx is invoked first.
It still replaces WPHwManager in the way that WPHwManagerEx is invoked before WPHwManager is. Per default WPHwManagerEx will just delegate the call to WPHwManager. With the little exception for when it overrides any WPHwManager methods. In that case, WPHwManagerEx is invoked first.
Then it can decide what it wants to do: completely replace a method, do something and then call the WPHwManager method or call the WPHwManager method and then do something. The latter is normally done to setup some desired default "state" and then do a modification.
Then it can decide what it wants to do: completely replace a method, do something and then call the WPHwManager method or call the WPHwManager method and then do something. The latter is normally done to setup some desired default "state" and then do a modification.
Exactly what WPHwManagerEx does for the "WPPopulate" method.
Exactly what WPHwManagerEx does for the "WPPopulate" method.
Line 30: Line 21:
See enclosed sources.zip. You will need the OS/2 DDK as well as the OS/2 toolkit.
See enclosed sources.zip. You will need the OS/2 DDK as well as the OS/2 toolkit.
It uses VAC to create the DLL. If you want to use Watcom you might need to modify the calling conventions etc.
It uses VAC to create the DLL. If you want to use Watcom you might need to modify the calling conventions etc.


==Author==
==Author==
Line 38: Line 28:
* [[Manual Installation of HWMan Class]]
* [[Manual Installation of HWMan Class]]


[[Category:Software]]
[[Category:Open Source Software]]
[[Category:Open Source Software]]

Revision as of 01:57, 31 August 2017

HWMAN is a WPS class replacement for HWManager (the OS/2 Hardware Manager).

This is an update to the OS/2 "Hardware-Manager" that does 2 things:

  1. It removes "WPDevice" nodes from the HW manager device tree if the corresponding RMNode does not exist anymore. This finally fixes the problem that if you remove USB devices they would never be removed from the HWManager device tree. This is not limited to USB devices. Any non existing RM node will lead to removal of the corresponding WPDevice.
  2. A changed icon for any "bus devices" to show the WPBusDev icon (that's the "3 squares icon" coloured in yellow, red and blue). For example, a "bus device" would be an AGP bus connected to the PCI bus via a bridge (the AGP "bus device" is an addition that Veit Kannegiesser had added to PCIBUS.SNP if it finds an AGP bus).

Function

WPHwManagerEx class depends on WPHwManager, it is not a 100% replacement of the original class, that's why it is so small. It changes the behavior of WPHwManager while letting WPHwManager do all the rest it has been doing already.

It still replaces WPHwManager in the way that WPHwManagerEx is invoked before WPHwManager is. Per default WPHwManagerEx will just delegate the call to WPHwManager. With the little exception for when it overrides any WPHwManager methods. In that case, WPHwManagerEx is invoked first.

Then it can decide what it wants to do: completely replace a method, do something and then call the WPHwManager method or call the WPHwManager method and then do something. The latter is normally done to setup some desired default "state" and then do a modification. Exactly what WPHwManagerEx does for the "WPPopulate" method.

Download

Build Source Code

See enclosed sources.zip. You will need the OS/2 DDK as well as the OS/2 toolkit. It uses VAC to create the DLL. If you want to use Watcom you might need to modify the calling conventions etc.

Author

Lars Erdmann

Articles