Thread: directinput question, error message

  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    164

    directinput question, error message

    When linking this .lib file I am getting this error message returned:
    Code:
    Generating Code...
    Linking...
    C:\ASE\Navigator\dinput8.lib : fatal error LNK1113: invalid machine type
    Error executing link.exe.
    I ran a search for the file and I know it exists in this particular location, because I copied it there. It also exists in other locations after running an sdk install from MS. I should mention I am using Visual studio 6.0 C++. Quite old, try to keep up with updates.

    Below is the code I am attempting to use to intialize and run directinput. I am a rookie!
    Code:
    #define DIRECTINPUT_VERSION 0x0800
    #include "dinput.h"
    Thanks for any help or just for looking....

  2. #2
    Registered User
    Join Date
    May 2004
    Posts
    164

    Angry

    Ok giving up on directinput... Just wanted to get keyboard input for arrow keys.... ARGGGGGGGGGGGGGGGGG....

    however, I found a new drug.... Now I am just trying to use message handling to grab the WM_KEYDOWN msg and then process the virtual key pushed.... However, it appears by default my dialog program uses the arrow key as navigation to buttons, can anyone understand how I might disable this on initiation of the dialog???

    below is my function called when you pushe specific movestate button to try and capture arrow keys from the user:
    Code:
    void CNavigatorDlg::OnMoveStateOn() 
    {
    	moveState = 1;
    	UINT uMsg; 
    	WPARAM wParam;
    
    	//set case to record arrow key move instructions
    	switch (uMsg)
    	{
    		case WM_CHAR:
    		if (WM_KEYDOWN)
    		{
    				switch (wParam) 
    				{ 
    					case VK_LEFT: 
                        
    						// Process the LEFT ARROW key. 
    						m_Direction = "Left";
    						UpdateData (false);                   
    						break; 
     
    					case VK_RIGHT: 
                        
    						// Process the RIGHT ARROW key. 
    						m_Direction = "Right";
    						UpdateData (false);
    						break; 
     
    					case VK_UP: 
                        
    						// Process the UP ARROW key. 
                         
    						break; 
     
    					case VK_DOWN: 
                        
    						// Process the DOWN ARROW key. 
                         
    						break; 
    				}
    		}
    	}
    
    	
    	//set color indicator of move status
    	m_MoveState.SetColor(RGB(0,255,0));
    }

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    164

    apologies, wrong location for thread

    I apologize, in haste I put this in the wrong message location, should be in Windows programing, sorry for any confusion, but I appreciate any assistance....

    Sincerely
    WaterNut :-)

  4. #4
    Registered User
    Join Date
    Jun 2011
    Posts
    1
    The same question with me 。And There is no answer now!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  2. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  3. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  4. DirectInput or WM_KEYDOWN question
    By Mecnels in forum Game Programming
    Replies: 4
    Last Post: 03-18-2003, 06:45 AM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM