[This message has been edited by pdown (edited October 08, 1999).]
🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
DirectInput Linker errors.
dxguid.lib
and you need to
#define INITGUID
g'luck
-fel
Are you perhaps using the DX7 borland libs? I know that during the beta, the lib's had an error in them. They should be fine now. Did you upgrade to DX7 gold?
Six
Is this upgrade also available for VC++ 6.0?
I hope it isn't 128 MB (!)
When I said DX7 gold, I meant the RTM. If you have the final version, you should be fine.
Six
AND #define INITGUID as stated above. Just #define INITGUID would do in most cases. Adding the lib would only increase the size of your exe-file. Try without the lib, if it works then, do not use it.
Christoffer Sandberg
todderod@algonet.se
bool DirectInputInit(){
HRESULT dirval;
dirval = DirectInputCreate((HINSTANCE)GetWindowLong(windowhandle,GWL_HINSTANCE), DIRECTINPUT_VERSION, &lpDI, NULL);
if( dirval != DI_OK) return(false);
dirval = lpDI->CreateDevice(GUID_SysKeyboard,&lpKeyboard,NULL);
if( dirval != DI_OK) return(false);
dirval = lpKeyboard->SetDataFormat(&c_dfDIKeyboard);
if( dirval != DI_OK) return(false);
dirval = lpKeyboard->SetCooperativeLevel(windowhandle,DISCL_EXCLUSIVE | DISCL_FOREGROUND);
if( dirval != DI_OK) return(false);
lpKeyboard->Acquire();
return(true);
};