Sign in to follow this  
Gzealot

Weird error in DirectInput that i cant get rid of?

Recommended Posts

Gzealot    122
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
Gzealot    122
*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
Gzealot    122
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   
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
Mezz    571
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this