(This is for DirectX programming but is general in nature so I thought it fit better in this forum.)
In section 5.2.4 of the book Introduction to 3D Game Programming with DirectX (Google Books link below), when polling the mouse the author calls GetDeviceState() and passes the second parameter which is declared as LPVOID, as (void**)&mMouseState. mMouseState is of type structure DIMOUSESTATE2 (not a pointer to one).
I'm curious why the author is casting the address of the structure to pointer-to-pointer-to-void instead of just omitting the cast entirely. Can someone tell me what I'm missing and what exactly the (void**) is achieving in this context?