Convert const(GUID)* to GUID*

Loopback elliott.darfink at gmail.com
Sat Jun 25 12:48:18 PDT 2011


Hello!

I've recently been working with DirectInput using the win32 API Binding
at dsource.org. This wrapper has been working perfectly fine until I
started using GUID constants defined in win32.directx.dinput8.

The directx function DirectInput8Create takes these parameters:
HRESULT DirectInput8Create(HINSTANCE, DWORD, GUID*, void**, IUnknown);

For the GUID* (3rd) parameter, I specify the IID_IDirectInput8 constant.
This is defined in the dinput8 file as follows:
const GUID IID_IDirectInput8A = {...};

If I supply this constant to the DirectInput8Create function the
compiler complains saying that it cannot convert const(GUID) to GUID*.
If I instead use &IID_IDirectInput8 (as a reference) I get the
"Cannot convert const(GUID)* to GUID*" instead. So my question is; how
do I solve this?


More information about the Digitalmars-d-learn mailing list