So, sorry about the vagueness of my original posts guys. Many appologies
No problem Sorry I sounded a bit harsh. It sure sounds like you (or the guys who provided you that API) were just guessing, though... Who knows what they were putting into that pointer.
But if you are both sure that it's a pointer to a IDirect3DDevice9*, AND that it was created on the same thread as the thread that you are trying to use it on (especially, it should not come from a separate process), then reinterpret_cast<LPD3DDEVICE9> should definitely work...
My guess is however, that it's not a pointer to IDirect3DDevice9. Most plugin APIs usually have their own data types - I don't think they would allow you access to a IDirect3DDevice9 directly, of all things. Ar you sure they specifically said "pointer to IDirect3DDevice9" and not something vague, like "pointer to device"?
Microsoft only has a REAL data type in their SQL database products, AFAIK - if you (or they) are passing this pointer through a database, it probably isn't coming from the same process? At least, there's no point in using a database for passing variables between different subroutines of the same process - let alone, passing data pointers as REAL values, and let alone passing pointers through a database interface.
I looked up the data types you mentioned, in relation with GameMaker, and just for the purpose of getting somewhere with this, perhaps the most appropriate datatype to use is GML's Pointer type: http://docs.yoyogames.com/source/dadiospice/002_reference/001_gml%20language%20overview/data%20types.html ?
(And no, in this case, REAL is not a data type defined by Microsoft - it's a GameMaker GML data type, by the looks of it - the guys you were in touch with were probably talking about GML data types, while you were talking about C++).
And I think this is your post: http://enigma-dev.org/forums/index.php?topic=2258.msg22578#new :)
So just change the double to void*, and as they also recommended, use reinterpret_cast...