Initial
This commit is contained in:
21
video/VIDCTRL.CPP
Normal file
21
video/VIDCTRL.CPP
Normal file
@@ -0,0 +1,21 @@
|
||||
#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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user