Direct Input problem

Started by
13 comments, last by cpp boy 21 years, 1 month ago
Hi people, I''ve got a really big problem in direct input. You see i include dinput.h and dinput.lib . When i get to making the LPDIRECTINPUT lpdi it goes fine. But when i go to the function DirectInputCreate, that show the function parameters, it says that the function doesn''t existe. I''ve tried reinstalling my sdk''s but nothing have change. And my problem isn''t in the parameters that I''ve put inside. What could be the problem. I''ve got my sdk from a cereal box(joke I got it from Programming rôle playing game whit directx). Kevin
Kevin
Advertisement
quote:
DirectInputCreate


Do you mean DirectInput8Create() (dinput8.lib) or DirectInputCreateEx() (dinput.lib)?


Qui fut tout, et qui ne fut rien
Invader''s Realm
I''ve resold that problem by installing an other version of directx sdk. But now i''ve got an event bigger problem. I''m now trying to make a keyboard device and it a total desaster. Here the code that I use.

#define INITGUID

#include <objbase.h>

LPDIRERCTINPUTDEVICE lpdikey;

lpdi->CreateDevice(GUID_SysKeyboard, lpdikey, NULL);

and i compille all goes well but then my application bugs and then i return to msvc++ and they say there an error whit this and they dont specifie here where they point the error

lpdi->CreateDevice(GUID_SysKeyboard, lpdikey, NULL);

what could be the problem. And by the way i use directx 6.1 sdk''s to do so and msvc++ 6.0 to compile.

Kevin
Kevin
instead of lpdikey try &lpdikey ......
if that fails email me and i''ll send you a piece
of easy code that works with dx8. i had the same prob 3 days ago...

[Hugo Ferreira][Positronic Dreams]
Need [3D Artist] & [Sound Designer]
for small project. Contact me plz...

sorry in my code i had put the &. But my code isn''t a problem for the debbuger of c++ but for windows it is. I think it''s because I''m trying to initialize directdraw and directInput at the same time, but it could be possible that its not.

Kevin
Kevin
for the moment I''m using directx 6.1 I have the 8.1 sdk but direct Input didn''t seemed to work so i changed.

Kevin
Kevin
plz respond

Kevin
Kevin
quote:Original post by cpp boy
for the moment I''m using directx 6.1 I have the 8.1 sdk but direct Input didn''t seemed to work so i changed.

Kevin


Dont blame Direct Input for your own mistakes.


Qui fut tout, et qui ne fut rien
Invader''s Realm
Well Invader, i''m disapointed. That reply was everything
but helpful. Let''s make sure that does''nt happen again, ok?
cpp boy, i''m sorry, but i''m not the kind of coder that
can look at a piece of code and tell what the proble was.
Lets do this, you zip your source code and email it to
hugo@positronicdreams.com and i''ll compile it and try it out,
ok?

this is the best i can do for you right now, so go zip it.

[Hugo Ferreira][Positronic Dreams]
Need [3D Artist] & [Sound Designer]
for small project. Contact me plz...

Go back to DX8.1 and use:

LPDIRECTINPUT8 not LPDIRECTINPUT

and

LPDIRERCTINPUTDEVICE8 not LPDIRERCTINPUTDEVICE

This topic is closed to new replies.

Advertisement