#include dinput.h -- removed carrots, html removes the whole thing DirectInput8Create( g_Window.GetHInstance(), DIRECTINPUT_VERSION, IID_IDirectInput8, (void**)&_dinput, NULL);
and the errors:
c:\documents and settings\directx\cgraphics.h(25) : error C2146: syntax error : missing ';' before identifier '_dinput' c:\documents and settings\directx\cgraphics.h(25) : error C2501: 'LPDIRECTINPUT8' : missing storage-class or type specifiers c:\documents and settings\directx\cgraphics.h(25) : error C2501: '_dinput' : missing storage-class or type specifiers c:\documents and settings\directx\cgraphics.h(26) : error C2146: syntax error : missing ';' before identifier '_dinputdevice' c:\documents and settings\directx\cgraphics.h(26) : error C2501: 'LPDIRECTINPUTDEVICE8' : missing storage-class or type specifiers c:\documents and settings\directx\cgraphics.h(26) : error C2501: '_dinputdevice' : missing storage-class or type specifiers c:\documents and settings\directx\cgraphics.cpp(115) : error C2065: 'DirectInput8Create' : undeclared identifier c:\documents and settings\directx\cgraphics.cpp(115) : error C2065: 'IID_IDirectInput8' : undeclared identifier c:\documents and settings\directx\cgraphics.cpp(116) : error C2065: '_dinput' : undeclared identifier
It simply doesn't exist to the compiler, and after looking at the header file I noticed that DIRECTINPUT_VERSION is 0x0800 by DEFAULT! For some reason the compiler isn't processing it?
#define DIRECTINPUT_HEADER_VERSION 0x0800 #ifndef DIRECTINPUT_VERSION #define DIRECTINPUT_VERSION DIRECTINPUT_HEADER_VERSION #endif further down.... #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);
My question is why do I have access to DirectInputCreateA() but not DirectInput8Create() when I have even specifically defined a version of 0x0800...I'm using VC++ but it has to be the compiler =\












