Sign in to follow this  
varungang

Problem with DirectInput8Create while debugging

Recommended Posts

Hi, i am a newbie...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... [Edited by - Muhammad Haggag on November 28, 2005 4:36:09 AM]

Share this post


Link to post
Share on other sites
Thanks a lot for replying...
i call this from another class
m_Input.Init(GethWnd(), GethInst());
GethWnd(),GethInst() returns the handler(m_hWnd) and the instace of the window( m_hInst) respectively....
m_hWnd = CreateWindow(m_Class, m_Caption,WS_OVERLAPPEDWINDOW,
m_XPos, m_YPos,
m_Width, m_Height,
NULL, NULL, m_hInst, NULL);


the debugging escapes to disassembly as it leaves the line DirectInput8Create so i dont get to know what it returns...

hope so this will do
regards



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