DX8 + DInput + Backward compatible???

Started by
2 comments, last by Damien 23 years, 2 months ago
I recently installed the DX8 sdk, now my apps with Dinput code will not compile, This is the Error "error C2065: ''DirectInputCreate'' : undeclared identifier" I had a look in the dinput.h file and found the following comment /* * To build applications for older versions of DirectInput * * #define DIRECTINPUT_VERSION [ 0x0300 | 0x0500 | 0x0700 ] * * before #include . By default, #include * will produce a DirectX 8-compatible header file. * */ I gave this a try, like so #define DIRECTINPUT_VERSION [ 0x0300 | 0x0500 | 0x0700 ] #include "dinput.h" but I got the following compile error, has anyone any Idea whats going on "c:\mssdk\include\dinput.h(145) : fatal error C1017: invalid integer constant expression" I have my Dinput objects defined as follows //********************************************* //********* DINPUT **************************** // DirectInput Objects LPDIRECTINPUT lpDI; LPDIRECTINPUTDEVICE lpDIDKeyboard; LPDIRECTINPUTDEVICE lpDIDMouse;
Advertisement
er... it means to use one of those numbers, (the version you want to use) not the whole thing.

#define DIRECTINPUT_VERSION 0x0500

''''A bird in hand is safer than one overhead''''
"There is only one everything"
I think youshould just replace

#define DIRECTINPUT_VERSION [ 0x0300 | 0x0500 | 0x0700 ]

by

#define DIRECTINPUT_VERSION 0x0300
or
#define DIRECTINPUT_VERSION 0x0500
or
#define DIRECTINPUT_VERSION 0x0700

depending on the version of DX you want

cu
belette/wipe
www.wipe-fr.org
Ahem, what the header means is:
If you want DirectInput version one:
#define DIRECTINPUT_VERSION 0x0300#include <dinput.h>  

if you want DirectInput version two:
#define DIRECTINPUT_VERSION 0x0500#include <dinput.h>  

if you want DirectInput version 7:
#define DIRECTINPUT_VERSION 0x0700#include <dinput.h>  


Rather than defining [ 0x0300 | 0x0500 | 0x0700 ].

Whoops! It's already been said three times.

Just because you're outnumbered doesn't mean you're wrong.


sharewaregames.20m.com

Edited by - furby100 on February 12, 2001 1:38:58 PM

This topic is closed to new replies.

Advertisement