... because they just casted lParam into a pointer to DEV_BROADCAST_HDR a few lines above, which is the common part of the different structure it could point to. That's just doing inheritance the C way. What did they expect? A C++ class from a C api?