How Cool are void pointers?
-
I'm reading Feng Yuan's, "Windows Graphics Programming", and while it is an incredible investigative journey, I am really confused about one particular feature. In his technical description of the the internal data structures of the Windows 2000 graphics engine and GDI APIs, he lists numerous undocumented structures which the operating system maintains in kernel address space. This is fascinating stuff, but, even a nitwit like me notices pretty quickly that most of these structs are populated with void pointers to other undocumented structs. I can't imagine why Microsoft would use so many void pointers. The only possibility that seems reasonable is that the void pointer conceals the actual data structure from nitwits like me in user address space. Anybody have any hard intel on this stuff?
-
I'm reading Feng Yuan's, "Windows Graphics Programming", and while it is an incredible investigative journey, I am really confused about one particular feature. In his technical description of the the internal data structures of the Windows 2000 graphics engine and GDI APIs, he lists numerous undocumented structures which the operating system maintains in kernel address space. This is fascinating stuff, but, even a nitwit like me notices pretty quickly that most of these structs are populated with void pointers to other undocumented structs. I can't imagine why Microsoft would use so many void pointers. The only possibility that seems reasonable is that the void pointer conceals the actual data structure from nitwits like me in user address space. Anybody have any hard intel on this stuff?
-
I'm reading Feng Yuan's, "Windows Graphics Programming", and while it is an incredible investigative journey, I am really confused about one particular feature. In his technical description of the the internal data structures of the Windows 2000 graphics engine and GDI APIs, he lists numerous undocumented structures which the operating system maintains in kernel address space. This is fascinating stuff, but, even a nitwit like me notices pretty quickly that most of these structs are populated with void pointers to other undocumented structs. I can't imagine why Microsoft would use so many void pointers. The only possibility that seems reasonable is that the void pointer conceals the actual data structure from nitwits like me in user address space. Anybody have any hard intel on this stuff?
void pointers are generic and can point to anything. It allows you to write generic functions and classes. so you could pass a string pointer or a integere pointer or a struct pointer and they'll all be accepted by the coid pointer variable. Nish
Author of the romantic comedy Summer Love and Some more Cricket [New Win] Review by Shog9 Click here for review[NW]
-
I'm reading Feng Yuan's, "Windows Graphics Programming", and while it is an incredible investigative journey, I am really confused about one particular feature. In his technical description of the the internal data structures of the Windows 2000 graphics engine and GDI APIs, he lists numerous undocumented structures which the operating system maintains in kernel address space. This is fascinating stuff, but, even a nitwit like me notices pretty quickly that most of these structs are populated with void pointers to other undocumented structs. I can't imagine why Microsoft would use so many void pointers. The only possibility that seems reasonable is that the void pointer conceals the actual data structure from nitwits like me in user address space. Anybody have any hard intel on this stuff?
"undocumented structure" means the structure can't be defined, the reason that it can't be defined is those void pointers, they are not cool at all, they are something can not be defined. i.e. for dialog template structure ("undocumented structure"), u see these stories: WORD id; void* pv; what does pv mean? if id=0; pv is null; if id=1; pv to a DWORD; if id=2; pv to a char string; (i can't remember exactly values, here is just idea) these kind of "structures" can't be defined, so called "undocumented structure" - do body can document (define) it. hope u understand that void* is not cool, it is "no words to say". includeh10
-
"undocumented structure" means the structure can't be defined, the reason that it can't be defined is those void pointers, they are not cool at all, they are something can not be defined. i.e. for dialog template structure ("undocumented structure"), u see these stories: WORD id; void* pv; what does pv mean? if id=0; pv is null; if id=1; pv to a DWORD; if id=2; pv to a char string; (i can't remember exactly values, here is just idea) these kind of "structures" can't be defined, so called "undocumented structure" - do body can document (define) it. hope u understand that void* is not cool, it is "no words to say". includeh10
You know, I kind of posted this inquiry half in jest, becuase it was my understanding that void pointers are NOT cool (and are, in fact, unsafe). I mean without typecasting, the potential exists for the wrong type of pointer residing in the structure. And, apparently, I've confused you guys somewhat, because the author represents much of his technical information on "undocumented internals" as being taken from Microsoft's documentation for the Device Driver SDK. The Feng Yuan also invents soem ingenious methods for obtaining information from OS kernel components (which is theoretically, not accessible from a user application). He does this with Windows 2000 (my machine has Windows 98, and some of the function calls he employs are not available on Windows versions earlier than 2000 or XP). Anyway, it's a long story. And, I'm a novice to Windows systematics. The main reason I posted is that it seemed like a marginal technique to employ for critical kernel DLLs and the systems calls that they provide. If I find out anything interesting, I'll get back.