I want to use some of GHI Hardware class capabilities. How should I make driver choose which assembly to use based on motherboard type?
One of the changes in GHI 4.3 SDK was to merge Premium and OSHW libraries.
By this you don’t have to switch.
But be aware that some functions will not work with OSHW hardware.
I’m not sure how to check what is supported and what not.
If you need to use 4.2 SDK you could do as follows:
Create one dll assembly that provides only independent functionality and abstract interfaces/classes for HW access, and a class factory pattern to create instances for them.
Then create two more dll’s, one for OSHW, one for premium, which implements these interfaces.
On startup set the class factory to the correct types.