Sign in to follow this  

DirectInput8 gone in august update?

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
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 this post


Link to post
Share on other sites
Quote:
Original post by ArmitageIII87
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.



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 this post


Link to post
Share on other sites
Quote:
Original post by rewt
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


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 specifiers
c:\documents and settings\directx\cgraphics.h(26) : error C2501: '_dinput' : missing storage-class or type specifiers
c:\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 specifiers
c:\documents and settings\directx\cgraphics.h(27) : error C2501: '_dinputdevice' : missing storage-class or type specifiers
c:\documents and settings\directx\cgraphics.cpp(117) : error C2065: 'DirectInput8Create' : undeclared identifier
c:\documents and settings\directx\cgraphics.cpp(118) : error C2065: '_dinput' : undeclared identifier


ps. The library is linked

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites
Quote:
Original post by rewt
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.

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


since the define is the same it shouldn't matter, and the function arguments wouldn't matter since its not recognizing the function at all. I have found this in the dinput.h file tho:


#if DIRECTINPUT_VERSION > 0x0700

extern HRESULT WINAPI DirectInput8Create(HINSTANCE hinst, DWORD dwVersion, REFIID riidltf, LPVOID *ppvOut, LPUNKNOWN punkOuter);

#else
extern HRESULT WINAPI DirectInputCreateA(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTA *ppDI, LPUNKNOWN punkOuter);
extern HRESULT WINAPI DirectInputCreateW(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTW *ppDI, LPUNKNOWN punkOuter);


Which means it IS there I just can't access it, and like u said it defines 0x0800 at the beginning of the header =\. I'm going to try a reboot, maybe my program leaked memory into VC++ and is messin it up or somethin.

UPDATE: reboot didn't help :(

Share this post


Link to post
Share on other sites
Quote:
Original post by durban
I've noticed that everything that the dinput.h tests for I dont have access to and everything after #else I do... Anyone know why this is?

Did you have a previous version of the SDK installed? Did you ensure that your IDE is drawing from the updated version?

I've never had these problems, so I really can't help you. Setting up and configuring DirectX SDKs and MSVC is trivial - so long as you've read the documentation and know how the various parts of the IDE work. All the evidence points to a configuration issue.

Share this post


Link to post
Share on other sites
Yes, I had April 2005 update installed and running on this same app, however, its a pretty large app and all other functions of the new August directx are working fine, I will make a simple program just to test DInput just to be sure tho. thanks

..Even this drops like a rock

#include <windows.h>
#include <dinput.h>

int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow )
{
DirectInput8Create();
return false;
}


Can't find DirectInput8Create(), right now i think i'll bash microsoft forums for awhile, thx for the help guys I atleast know what my problem is now.

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

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