22 lines
562 B
C++
22 lines
562 B
C++
#include <video/vidctrl.hpp>
|
|
|
|
VideoControl::VideoControl(void)
|
|
: VxDControl("\\\\.\\VIDEO.VXD")
|
|
{
|
|
if(!isOkay()){mErrorCode=::GetLastError();return;}
|
|
resetError();
|
|
if(ExpectedVersion!=getVersion())VxDControl::~VxDControl();
|
|
}
|
|
|
|
DWORD VideoControl::getVersion(void)
|
|
{
|
|
DWORD returnCode(FALSE);
|
|
|
|
if(!isOkay())return FALSE;
|
|
resetError();
|
|
if(!::DeviceIoControl((HANDLE)*this,GetVersion,(LPVOID)0,0,(LPVOID)mReturnInfo,sizeof(mReturnInfo),&mBytesReturned,0))mErrorCode=::GetLastError();
|
|
else returnCode=TRUE;
|
|
return (returnCode?mReturnInfo[1]:returnCode);
|
|
}
|
|
|