Direct Input: What the hell is going on here!?

Started by
11 comments, last by Andrew Russell 23 years ago
OK, first of all, I am shocked by the lack of good tutorials on DIn, does anyone know of any tutorials that are BETTER than the SDK? Now my question, I am using BCB 3, and the DX7a SDK, with of course, the Borland Libarys (dinput.lib). Now, I keep getting this:

[LinkerError] Unresolved external ''_IID_IDirectInput7A'' referenced from D:\***\INPUT.OBJ.
[LinkerError] Unresolved external ''_IID_IDirectInputDevice7A'' referenced from *:\***\INPUT.OBJ.
 
I have included the libary properly, and it has only stopped working since I moved from IDirectInput to IDirectInput7 objects (and same for the devices). (note: this is because using the other stuff was stuffing up even more) Any help? ANDREW RUSSELL STUDIOS
Visit Tiberia: it''s bigger, it''s badder, it''s pouyer...
Advertisement
Did you link "dxguid.lib" ?
I used to have the same problems like you. This solved them.

Mathias
Mate.

I feel your pain, getting my Borland v4.52 and DX8 to be buddies was a real mission, and it was DI that was the final straw in fact, for me. I turned to the dark side in the end, MSVC ... but this doesn''t help you

The anon dude is right though. Another way to beat the problem is to throw in a

  #define INITGUID  


up the top. Good luck

El Duderino
Argg, I about plunged a sharp object through my chest with this one. How I solved it was to use older directx version 3 libraries just for direct input. However, this caused some other problems I had to work around, but at least it worked. Obviously whomever compiled the borland libs didn''t test direct input to see if they worked before they released the sdk. I talked to a bunch of people at DX support to see if they were going to fix this problem. Their reply was, "don''t use borland." -- Thanks a lot smart a$$. Anyway, needless to say, I moved to MSVC, but there are still times I move back to borland builder to make quick apps. It has been awhile since I have actually used borland and I don''t know if they have resolved these problems with DX8SDK because I still use DX7SDK for the most part.
OK guys, thanks alot for that. All fixed.
You don''t know of of any alternitaves to DIn, do you?

*wishes there was an OpenIL or somthing*



quote:Original post by PowerBoyAlfa
Their reply was, "don''t use borland." -- Thanks a lot smart a$$.


Damnit, when will MS learn that there is software that they DON''T make, and people use it!

It''s moments like these you need LINUX!

ANDREW RUSSELL STUDIOS
Visit Tiberia: it''s bigger, it''s badder, it''s pouyer...
Crap: I am still getting invalid parm errors when I try to create the DIn object (I was getting them before as well). The SDK is very sketchy on how to fix the thing when you get errors. Any help?

ANDREW RUSSELL STUDIOS
Visit Tiberia: it''s bigger, it''s badder, it''s pouyer...
quote:Crap: I am still getting invalid parm errors when I try to create the DIn object (I was getting them before as well). The SDK is very sketchy on how to fix the thing when you get errors. Any help?


Well that all depends on what you''re init code looks like really doesn''t it!
sounds like that could be the way you''re trying to set it up.

"Bad Day... F**K it!" -Stephen Baldwin (Usual Suspects)
"Bad Day... F**K it!" -Stephen Baldwin (Usual Suspects)
Wooah, sorry, I was in a hurry to get that one in there, so I forgot the details.

hr = DirectInputCreateEx( hInstance, DIRECTINPUT_VERSION, IID_IDirectInput7, (void**)&m_pDI, NULL ); 


and hr gets set to DIERR_INVALIDPARAM, and then the setup function returns an error.

I have no idea why this wouldn''t work, it is basicly copy/pasted from the SDK. Could it be somthing to do with the fact that I use clases for everything, and my only global is the function WinMain?

btw, sure none of you know of any good tutorials about the inner workings on direct input?

ANDREW RUSSELL STUDIOS
Visit Tiberia: it''s bigger, it''s badder, it''s pouyer...
quote:Andrew Russell
hr = DirectInputCreateEx( hInstance, DIRECTINPUT_VERSION, IID_IDirectInput7, (void**)&m_pDI, NULL );


Hmmm... well, I assume you're linking with the DX7 libraries else the DIRECTINPUT_VERSION will be wrong.
and that you're setting hInstance to your apps instance.
I'm not sure wether you need to cast m_pDI to (void**),

As for tutorials a quick search of the gamedev archives reveals

http://www.gamedev.net/reference/articles/article1309.asp

hope that helps...



"Bad Day... F**K it!" -Stephen Baldwin (Usual Suspects)

Edited by - Nutter2000 on March 22, 2001 5:02:12 AM
"Bad Day... F**K it!" -Stephen Baldwin (Usual Suspects)
Looks good to me ... maybe jam this up top as well

  #define DIRECTINPUT_VERSION 	 0x700  


... this is the code I''m using atm

  LPDIRECTINPUT7 lpDI;...if(FAILED(DirectInputCreateEx(hInstance, DIRECTINPUT_VERSION, IID_IDirectInput7, (void **) &lpDI, NULL))){   return FALSE;}  


hope it helps.

El Duderino

This topic is closed to new replies.

Advertisement