DInput

Started by
6 comments, last by Erion 22 years, 2 months ago
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++
Advertisement
isn''t the function called DirectInput8Create() and not DirectInputCreate()?

}+TITANIUM+{
[ ThumbView: Adds thumbnail support for DDS, PCX, TGA and 16 other imagetypes for Windows XP Explorer. ] [ Chocolate peanuts: Brazilian recipe for home made chocolate covered peanuts. Pure coding pleasure. ]
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);
}
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+{
[ ThumbView: Adds thumbnail support for DDS, PCX, TGA and 16 other imagetypes for Windows XP Explorer. ] [ Chocolate peanuts: Brazilian recipe for home made chocolate covered peanuts. Pure coding pleasure. ]
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,

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
Make sure to include dinput8.lib, not dinput.lib if your using dinput8.
- Jeff Johnson"He who questions training, only trains himself at asking questions" - Sphynx
Tanck you everyone! Now it works (I forgot to include dinput8.lib)

This topic is closed to new replies.

Advertisement