<br><br><div class="gmail_quote">On Sat, Jun 25, 2011 at 2:48 PM, Loopback <span dir="ltr"><<a href="mailto:elliott.darfink@gmail.com">elliott.darfink@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello!<br>
<br>
I've recently been working with DirectInput using the win32 API Binding<br>
at <a href="http://dsource.org" target="_blank">dsource.org</a>. This wrapper has been working perfectly fine until I<br>
started using GUID constants defined in win32.directx.dinput8.<br>
<br>
The directx function DirectInput8Create takes these parameters:<br>
HRESULT DirectInput8Create(HINSTANCE, DWORD, GUID*, void**, IUnknown);<br>
<br>
For the GUID* (3rd) parameter, I specify the IID_IDirectInput8 constant.<br>
This is defined in the dinput8 file as follows:<br>
const GUID IID_IDirectInput8A = {...};<br>
<br>
If I supply this constant to the DirectInput8Create function the<br>
compiler complains saying that it cannot convert const(GUID) to GUID*.<br>
If I instead use &IID_IDirectInput8 (as a reference) I get the<br>
"Cannot convert const(GUID)* to GUID*" instead. So my question is; how<br>
do I solve this?<br>
</blockquote></div><br><div><br></div><div><br></div><div>I think you can cast the const away.<div><div>cast(GUID*)<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; background-color: rgb(255, 255, 255); ">&IID_IDirectInput8</span></div>
</div></div>