Question

I see in the documentation for a windows OS "DRIVER_OBJECT" that A driver object is partially opaque. But what does "partially opaque" mean?

I am guessing that means that only part of a DRIVER_OBJECT are avaialable, but then what, programatically speaking, does that mean? That is, if some code has a pointer to the DRIVER_OBJECT, then it can read (and possibly write) the whole object as one unit.

Was it helpful?

Solution

The complete quote is,

A driver object is partially opaque. Driver writers must know about certain members of a driver object to initialize a driver and to unload it if the driver is unloadable. The following members of the driver object are accessible to drivers.

The pertinent part is: Driver writers must know about certain members.

In order to write/use a driver you need certain parts of the code to be accessible. An interface of sorts. ( Without the language formalization that is). These members are explained in the document right after the above quote.

Undocumented members within a driver object should be considered inaccessible. Drivers with dependencies on object member locations or on access to undocumented members might not remain portable and interoperable with other drivers over time.

What this means is that while the required 'interface' is visible, anything else in the driver should be considered 'private'. Sure you can reach it in C, but this is unsupported and it may break, be un-portable, etc, etc.

This is the definition of partially opaque, opaque means 'not transparent'. Partially opaque means it is partially not transparent, or conversely, it is partially visible. The use of partially opaque rather then partially visible, puts the emphasis on the hidden nature of the driver object, rather then the visible parts.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top