• 12
• 12
• 9
• 10
• 13

# DirectInput8 gone in august update?

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

## Recommended Posts

I hope I dont sound dumb asking this but, has directinput8 been removed in the august update? there isn't a dinput8.h header file anymore, and I can't even initialize DirectInput >=( here's my code snippet that doesn't compile:
#define DIRECTINPUT_VERSION 0x0800

#include <dinput.h>

DirectInput8Create( g_Window.GetHInstance(), DIRECTINPUT_VERSION, IID_IDirectInput,
(void**)&_dinput, NULL);

That function simply isn't in dinput.h. I found that DirectInputCreate() is there but msdn doesn't have any documentation for it =\

##### Share on other sites
I just went to the msdn.microsoft.com/directx website and they don't appear to have removed dinput. That'd be a big deal because other than the windows message pump for handling input there isn't any other way that I'm aware of. Plus I think I would have seen this on the dxdev list. I'll verify it for for sure when I get home this evening. If it isn't there go and get the latest Platform SDK release cause I'm sure it'd be there.

##### Share on other sites
Quote:
Original post by Drew_Benton
Quote:
 To create a DirectX 8.x interface with the DirectX 9.0�software development kit (SDK) without using CoCreateInstance: 1. Set "#define DIRECTINPUT_VERSION 0x0800" before the include statement for Dinput8.h. 2. Call DirectInput8Create instead of DirectInputCreateEx. 3. Link to the Dinput8.lib library instead of Dinput.lib.

See if that does the trick.

Like I said there is no dinput8.h in the august update. I remember seeing it in the April Update though =\ I read that before and did the steps with dinput.h and it fails.

##### Share on other sites
Oh, I didn't even see that in your post, sorry about that. I'm not sure then, that seems very weird. I checked and have not found any information on MSDN about DI changes in the August SDK. Perhaps you could try a reinstall? I don't use the August SDK (they just come out too fast for me to upgrade), so I can't offer anything else there.

You could also try the alternative method on that page I last linked to:
Quote:
 To create a DirectX 8.x or DirectX 9.0 interface from the DirectX 8.x or DirectX 9.0�SDK using CoCreateInstance: 1. Call CoInitializeEx. 2. Call CoCreateInstance using CLISID_DirectInput8. 3. Use IDirectInput8::Initialize to initialize the DirectInput object.

And see if that will work.

##### Share on other sites
I am using direct input with the DirectX August 2005 update and the dinput.h and dinput.lib files are in my "C:\Program Files\Microsoft DirectX 9.0 SDK (August 2005)\Include" and "C:\Program Files\Microsoft DirectX 9.0 SDK (August 2005)\Lib\x86" folder respectively (using the default install path).

dinput.h does include the DirectInput8Create() function call. It is what I am using to create the direct input device. Looking in the August help documentation the direct input tutorials appear to be there.

Is it possible the install silently failed and did not correctly install pieces of the SDK? I would try uninstalling the SDK and then reinstalling it from scratch.

-Ryan

##### Share on other sites
Quote:
 Original post by ArmitageIII87I just went to the msdn.microsoft.com/directx website and they don't appear to have removed dinput. That'd be a big deal because other than the windows message pump for handling input there isn't any other way that I'm aware of. Plus I think I would have seen this on the dxdev list. I'll verify it for for sure when I get home this evening. If it isn't there go and get the latest Platform SDK release cause I'm sure it'd be there.

c:\documents and settings\directx\cgraphics.h(11) : fatal error C1083: Cannot open include file: 'dinput8.h': No such file or directory

dinput.h is there, but no documentation on how to use it.

Quote:
 Oh, I didn't even see that in your post, sorry about that. I'm not sure then, that seems very weird. I checked and have not found any information on MSDN about DI changes in the August SDK. Perhaps you could try a reinstall? I don't use the August SDK (they just come out too fast for me to upgrade), so I can't offer anything else there.

Yea, its crazy. I think they forgot to add the damn thing, I just searched my whole pc for it and i got nada. I'm going to switch back to the April update, thanks for the replies guys.

##### Share on other sites
Quote:
 Original post by rewtI am using direct input with the DirectX August 2005 update and the dinput.h and dinput.lib files are in my "C:\Program Files\Microsoft DirectX 9.0 SDK (August 2005)\Include" and "C:\Program Files\Microsoft DirectX 9.0 SDK (August 2005)\Lib\x86" folder respectively (using the default install path).dinput.h does include the DirectInput8Create() function call. It is what I am using to create the direct input device. Looking in the August help documentation the direct input tutorials appear to be there.Is it possible the install silently failed and did not correctly install pieces of the SDK? I would try uninstalling the SDK and then reinstalling it from scratch.-Ryan

Aye, mine is there too but its not recognizing DirectInput8Create() or the DirectInput8 pointers.

Here is how I used it:
#define DIRECTINPUT_VERSION 0x0800#include <dinput.h>DirectInput8Create( g_Window.GetHInstance(), DIRECTINPUT_VERSION, IID_IDirectInput,		(void**)&_dinput, NULL);

And the errors:
c:\documents and settings\directx\cgraphics.h(26) : error C2501: 'LPDIRECTINPUT8' : missing storage-class or type specifiersc:\documents and settings\directx\cgraphics.h(26) : error C2501: '_dinput' : missing storage-class or type specifiersc:\documents and settings\directx\cgraphics.h(27) : error C2146: syntax error : missing ';' before identifier '_dinputdevice'c:\documents and settings\directx\cgraphics.h(27) : error C2501: 'LPDIRECTINPUTDEVICE8' : missing storage-class or type specifiersc:\documents and settings\directx\cgraphics.h(27) : error C2501: '_dinputdevice' : missing storage-class or type specifiersc:\documents and settings\directx\cgraphics.cpp(117) : error C2065: 'DirectInput8Create' : undeclared identifierc:\documents and settings\directx\cgraphics.cpp(118) : error C2065: '_dinput' : undeclared identifier

##### Share on other sites

Also remember that SDK samples trump documentation. Study them.

##### Share on other sites
What I have done is only slightly different but that might be all that it takes. I did not define my DIRECTINPUT_VERSION as it was already defined as 0x0800 in the dinput.h file and my REFIID is IID_IDirectInput8.

#include <d3dx9.h>#include <dinput.h>HRESULT hr = DirectInput8Create(hInst, DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&g_pDirectInput, NULL);if ( FAILED( hr ) )	return hr;

Sorry for the double post, I meant for this to be an edit.