Jump to content
  • Advertisement
Sign in to follow this  
Gzealot

Weird error in DirectInput that i cant get rid of?

This topic is 4835 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My system is WinXP SP2, using VC++ 6.0 I was just initializing DirectInput 8.0 when a weird error popped up. after the lines of // Creation of Input object DirectInput8Create(hinstance_app, DIRECTINPUT_VERSION, IID_IDirectInput8, (void **)&lpdi,NULL); // create keyboard device lpdi->CreateDevice(GUID_SysKeyboard, &lpdikey,NULL); // Set Cooperative level lpdikey->SetCooperativeLevel(main_window_handle, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE); *i compiled the program at each line to make sure that there wasnt any syntax error* then i added this line of code // Set Data Format lpdikey->SetDataFormat(&c_dfDIKeyboard); then it gave a non-syntax error: dinput.lib(dilib2.obj) : fatal error LNK1103: debugging information corrupt; recompile module i tried reading about it but there wasnt much info on it. Even after i added in the acquire code it still gave me an error. However after i commented out that offensive line of code everything ran fine (the .exe was able to compile i mean, obviously i couldnt read the input properly.) Does anyone know what this problem is and have a solution to this? Its driving me nuts.. [Edited by - Gzealot on March 29, 2005 12:42:25 AM]

Share this post


Link to post
Share on other sites
Advertisement
*bounce*

and anyway when i tried to use it
SetDataFormat(&lpdimouse,&c_dfDIMouse); the error pops up again. Apparently, the error only pops up when i use the function SetDataFormat(); ... is there a workaround around this function?

Share this post


Link to post
Share on other sites
thanks.. going to try that now..
just asking what exactly does dxguid.lib do and what happens if i link to both dinput8.lib and dinput.lib? Are both required to function or is just one needed?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
dxguid contains global unique identifiers. These are unique sequences of characters and numbers used to identify things in your system via the registry.

Share this post


Link to post
Share on other sites
i read somewhere that inclusion of objbase.h is better than linking to dxguid.lib.. whats the dif?

Share this post


Link to post
Share on other sites
I think what you read is incorrect. Objbase.h gets included by the DirectX header files anyway. The SDK documentation lists the two options you have for making sure GUIDs are accessible, which are:
a) #define INITGUID before all other includes
b) link with dxguid.lib

Linking with dxguid.lib is the easiest, and works perfectly well.

-Mezz

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!