Войти
ПрограммированиеФорумЗвук

не могу описать IDirectInputDevice8 lpdikey

#0
17:30, 12 апр. 2009

я только на чал писать двиг звука, но сразу возникла проблема с компиляцией. Include и lib файлы подключил.

#define INITGUID
#include "standart.h"
#include "DINPUT.h"
#include "_dinput.h"

#define DIERR(x)         ((x!=DI_OK))

extern FILE     *log_file;
extern HINSTANCE main_instance;
extern HWND__ *hwnd;


LPDIRECTINPUT8 lpdi=NULL;
IDirectInputDevice8 lpdikey=NULL;//<<-------------------------------------------------Error
bool DIinited=false;

/**********************************ВВОД**************************************/

int DIinit(void)
{
 if(DIinited){ERR_DI_INIT; return 1;}
 if(DIERR(DirectInput8Create(main_instance,DIRECTINPUT_VERSION,IID_IDirectInput8,(void **)&lpdi, NULL)))
 {ERR_DI_CREATE; return 1;}
 if(DIERR(lpdi->CreateDevice(GUID_SysKeyboard,&lpdikey,NULL)))
 {ERR_DI_CREATE_DEVICE; return 1;}


 DIinited=true;
 return 0;
};

int DIrelease(void)
{
 if(!DIinited){ERR_DI_NOT_INIT; return 1;}
 if(lpdi!=NULL)if(DIERR(lpdi->Release())){ERR_DI_RELEASE; return 1;}
 //lpdisprimary=NULL;
 lpdi=NULL;
 DIinited=false;
 return 0;
};
/**********************************ВВОД**************************************/

/*********************************К О Н Е Ц**********************************/

E:\Data\documents\WORLD\_DINPUT.CPP(14) : error C2259: 'IDirectInputDevice8A' : cannot instantiate abstract class due to following members:
        E:\Data\documents\WORLD\DINPUT.h(1852) : see declaration of 'IDirectInputDevice8A'
E:\Data\documents\WORLD\_DINPUT.CPP(14) : warning C4259: 'long __stdcall IDirectInputDevice8A::QueryInterface(const struct _GUID &,void ** )' : pure virtual function was not defined
        E:\Data\documents\WORLD\DINPUT.h(1855) : see declaration of 'QueryInterface'
E:\Data\documents\WORLD\_DINPUT.CPP(14) : warning C4259: 'unsigned long __stdcall IDirectInputDevice8A::AddRef(void)' : pure virtual function was not defined
        E:\Data\documents\WORLD\DINPUT.h(1856) : see declaration of 'AddRef'
E:\Data\documents\WORLD\_DINPUT.CPP(14) : warning C4259: 'unsigned long __stdcall IDirectInputDevice8A::Release(void)' : pure virtual function was not defined
        E:\Data\documents\WORLD\DINPUT.h(1857) : see declaration of 'Release'
E:\Data\documents\WORLD\_DINPUT.CPP(14) : warning C4259: 'long __stdcall IDirectInputDevice8A::GetCapabilities(struct DIDEVCAPS *)' : pure virtual function was not defined
        E:\Data\documents\WORLD\DINPUT.h(1860) : see declaration of 'GetCapabilities'
E:\Data\documents\WORLD\_DINPUT.CPP(14) : warning C4259: 'long __stdcall IDirectInputDevice8A::EnumObjects(int (__stdcall *)(const struct DIDEVICEOBJECTINSTANCEA *,void *),void *,unsigned long)' : pure virtual function was not defined
        E:\Data\documents\WORLD\DINPUT.h(1861) : see declaration of 'EnumObjects'
E:\Data\documents\WORLD\_DINPUT.CPP(14) : warning C4259: 'long __stdcall IDirectInputDevice8A::GetProperty(const struct _GUID &,struct DIPROPHEADER *)' : pure virtual function was not defined
        E:\Data\documents\WORLD\DINPUT.h(1862) : see declaration of 'GetProperty'
E:\Data\documents\WORLD\_DINPUT.CPP(14) : warning C4259: 'long __stdcall IDirectInputDevice8A::SetProperty(const struct _GUID &,const struct DIPROPHEADER *)' : pure virtual function was not defined
        E:\Data\documents\WORLD\DINPUT.h(1863) : see declaration of 'SetProperty'


#1
20:41, 12 апр. 2009

эй че никого нет чтоли?...

#2
23:19, 12 апр. 2009

DD
> эй че никого нет чтоли?...

Ваша вежливость прямо валит с ног...

ПрограммированиеФорумЗвук

Тема в архиве.