HWman: Difference between revisions

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


==Information==
==Overview==
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:
#It removes "WPDevice" nodes from the HW manager device tree if the corresponding RMNode does not exist any more. 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 Kannegieser had added to PCIBUS.SNP if it finds an AGP bus).


This is an update to the OS/2 "Hardware-Manager".
==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 behaviour of WPHwManager while letting WPHwManager do all the rest it has been doing already.


It does 2 things:
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.
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.


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.
==Installation==
Instructions:
# copy the DLL (hwman.dll) to a convenient place
# open XWorkplace "WPS class list" object
# Do right click in class tree and select "register new class", select the DLL (hwman.dll) and specify "WPHwManagerEx" as the class to register
# refresh the "WPS class list" view by hitting F5 or do a WPS restart until "WPHwManagerEx" shows up in the "WPS class list" class tree
# open XWorkplace "WPS class list" object
# right click on "WPHwManager" and select "replace by subclass" (or whatever it's called in english)
# in the dialog select "WPHwManagerEx" which is a subelement of "WPHwManager"
# hit "OK
# restart WPS
If you attach and detach USB devices, you will need to hit F5 in the HWManager view to trigger an update of the view(s) (as always).
I could implement a secondary thread to trigger the update on a regular basis but I didn't (save CPU for more important things).
==Installation Screenshots==
===Using WPS Class List Utility===
[[Image:1 - hwman.png|400px]]
[[Image:2 - hwman.png]]
[[Image:3 - hwman.png]]
[[Image:4 - hwman.png]]
[[Image:5 - hwman.png|400px]]
[[Image:6 - hwman.png|400px]]
[[Image:7 - hwman.png]]
[[Image:8 - hwman.png|400px]]
Once hwman class is installed you can see that WPHwManagerEX overrides WPHwManager.
[[Image:9 - hwman.png|400px]]
==Download==
* [http://hobbes.nmsu.edu/h-search.php?sh=1&button=Search&key=hwman Hobbes Download]


==Build Source Code==
==Build Source Code==
Line 71: Line 19:
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==
*[[Lars Erdmann]]


==Author==
==Articles==
[[Lars Erdmann]]
* [[Manual Installation of HWMan Class]]


==Links==
* [http://hobbes.nmsu.edu/h-search.php?sh=1&button=Search&key=hwman10.wpi Version 10.0 Download]
* [https://github.com/OS2World/UTIL-WPS-HWMan Source code at Github]


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

Revision as of 14:59, 17 March 2018

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

Overview

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 any more. 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 Kannegieser 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 behaviour 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.

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

Articles

Links