Skip to main content
gamedev.net
🔒 Locked

please help

Started by curwen May 11, 2003 at 6:16 PM 1 replies 250+ views
Original Post
curwen
curwen
Please I''m trying to understand what''s going wrong with this piece of code : //includes...dinput.h and others extern HINSTANCE hGlobalInstance ; LPDIRECTINPUT8 lpDI8 ; LPDIRECTINPUTDEVICE8 lpDIDV8 ; HRESULT hr ; void CreateDIObject(void) //declarations included in headers { hr = DirectInput8Create(hGlobalInstance,DIRECTINPUT_VERSION, &IID_IDirectInput8,NULL); //using & before GUID ''cause the code is C if (FAILED(hr)) //...do something } // the previous function works // but following one that causes problems... void CreateDIDevice(void) { hr = lpDI8->CreateDevice(&GUID_SysKeyboard,&lpDIDV8,NULL) if (FAILED(hr))//do something... } this is the error I get from compiler : Compiling... app_input.c C:\msvc++\unisoft\app_input.c(31) : error C2039: ''CreateDevice'' : is not a member of ''IDirectInput8A'' c:\dxsdk\include\dinput.h(2622) : see declaration of ''IDirectInput8A'' Error executing cl.exe. Creating browse info file... unisoft.exe - 1 error(s), 0 warning(s) I''ve set the right paths and included necessary headers and libs(i mean dinput8.lib dxguid.lib ...) Maybe it''s a simple question but it really get me stuck. If someone could give me a hint I''le be very grateful. Thanks in advance
SimDemon
SimDemon
Try calling CreateDevice() from the LPDIRECT3DDEVICE8 object:

lpDIDV8->CreateDevice(// Stuff here);

If thispost = 0 Then
GoBack()

Else
Read()
End If
I'll have a link to the TriFaze website as soon as possible. It's still currently being designed, by myself of course! =) I'll update the URL and my signature as soon as possible.Feel free to send me a message on Yahoo! or AOL IM™. =)
curwen
curwen
It doesn''t work and it looked strange it could work ....
Anyway thanks...

Curwen

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.