Archived

This topic is now archived and is closed to further replies.

Erion

DInput

Recommended Posts

Hi! I have a problem. I''m trying to use the directInput but when I try to use DirectInputCreate I get Identifier unknown. Why is that? I have included dinput.h and DINPUT.LIB DXGUID.LIB WINMM.LIB. PS I use MSVC++

Share this post


Link to post
Share on other sites
Thank you for the help. I dont know what parameters DirectInput8Create takes please tell me.

DirectInputCreate should take this:

if(FAILED(DirectInputCreate(hinstance_app,DIRECTINPUT_VERSION,&lpdi,NULL)))
{
return(0);
}

Share this post


Link to post
Share on other sites
No prob!

Don''t you have the SDK help? It should''ve come with the SDK Learn to use it, it''s your best friend!

If you search for DirectInput8Create you''ll find:
HRESULT WINAPI DirectInput8Create(
HINSTANCE hinst,
DWORD dwVersion,
REFIID riidltf,
LPVOID* ppvOut,
LPUNKNOWN punkOuter
);



}+TITANIUM+{

Share this post


Link to post
Share on other sites
Thank you! I have the SDK but I can''t understand it, that''s the problem :-( I hope I''ll lern it somedag. If you can please expain

REFIID riidltf,
LPVOID* ppvOut,

Share this post


Link to post
Share on other sites
quote:

REFIID riidltf,
LPVOID* ppvOut,


Rriidltf = your idenitifer for DX8 Input
ppvOut = pointer to pointer to out. Ie:
IDirectInput8* Input = NULL;
//--- code ---
if(FAILED(hr=DirectInput8Create(HInstance,/*rest of junk*/,
&Input/*etc*/)) {

------------------------------
BCB DX Library - RAD C++ Game development for BCB

Share this post


Link to post
Share on other sites