An “Opaque” type in this context means that from the perspective of
developer who uses only the WDK header files (i. e. - does not have
access to Windows source code), the details of the type are at least
conceptually incomplete. Basically, this means that an incomplete type
is declared to satisfy the compiler, but the internals are not contained
in any header file. Generally, this means that a typedef declaring a
pointer to a type is declared as void *. The “conceptually” part is
necessary because some “opaque” types are, in fact, defined in the WDK
headers, but Microsoft wishes you to not use the internal definitions.
The complete definitions are contained in the private parts of the
Windows Source Code. As Pro indicated, these semantic construct is
generally used to prevent a developer from relying on the layout of a
type. A corollary of this is that this can be used to help prevent a
change in the declaration of a type to cause external developers from
having to recompile, but there are additional constraints that must be
met to ensure this.
mm
>> xxxxx@garlic.com 2007-05-07 22:32 >>>
I just did the search and here is the definition -
http://www.m-w.com/dictionary/opaque
It is anything but thickheaded :-).
It means, it could change anytime …
-pro
The call to ZwCreateFile() requires a pointer to as structure
“POBJECT_ATTRIBUTES ObjectAttributes”
However, when I search for the structure definition in the DDK help
file,
I get circular references between ZwCreateFile() and
InitializeObjectAttributes().
OBJECT_ATTRIBUTES
The OBJECT_ATTRIBUTES structure is an opaque structure that specifies
the
properties of an object handle. Use the InitializeObjectAttributes
routine
to set the members of this structure.
See Also
InitializeObjectAttributes
I had to grep through all the headers, before I could find what the
structure looks like, but I still don’t know what opaque means, in
reference to a structure
typedef struct _OBJECT_ATTRIBUTES {
ULONG Length;
HANDLE RootDirectory;
PUNICODE_STRING ObjectName;
ULONG Attributes;
PVOID SecurityDescriptor; // Points to type
SECURITY_DESCRIPTOR
PVOID SecurityQualityOfService; // Points to type
SECURITY_QUALITY_OF_SERVICE
} OBJECT_ATTRIBUTES;
typedef OBJECT_ATTRIBUTES *POBJECT_ATTRIBUTES;
typedef CONST OBJECT_ATTRIBUTES *PCOBJECT_ATTRIBUTES;
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer