Click to See Complete Forum and Search --> : Problem with DirectInput8Create while debugging


varungang
November 28th, 2005, 02:56 AM
Hi,
here is my code........
BOOL cInput::Init(HWND hWnd, HINSTANCE hInst)
{
// Free a prior Init
Shutdown();
// Record parent Window handle
m_hWnd = hWnd;
// Create a DirectInput interface \\\
m_pDI = NULL;
if(FAILED(DirectInput8Create( hInst, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&m_pDI, NULL)))
return FALSE;
// Return a success
return TRUE;
}
i use VC++ 6.0 and directx 9 sdk
can anybody tell me whats wrong with this code ,it compiles n runs fine but while debugging at line "DirectInput8Create" it exits to the
assembly gives dialog "userbreakpoint called at .....".here the hInst is valid...n even rest seems fine for me.any kind of help is welcomed.
thanks in advance...

Mike Harnad
November 28th, 2005, 09:38 AM
i use VC++ 6.0 and directx 9 sdk
Then, why are you calling version 8 functions?
if(FAILED(DirectInput8Create( hInst, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)

varungang
November 29th, 2005, 02:41 AM
Mike thanks for replying...
well if i am sutre thats how we create the direct input device for dx9sdk..(as there were no changes made to the dx9 for dxinput)
according to msdn....
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c/directx/input/ref/functs/directinput8create.asp

Mike Harnad
November 29th, 2005, 08:52 AM
My mistake. I don't use DirectInput and I mistakenly assumed that it had changed. Now, for debugging your problem...

Have you tried using the DirectX control panel applet to set the debugging level? It should provide you with enough info to determine the cause of the problem.