⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hvdevice.cpp

📁 Led识别与统计系统,基于DELPHI 7.0下
💻 CPP
字号:
// Machine generated IDispatch wrapper class(es) created by Microsoft Visual C++

// NOTE: Do not modify the contents of this file.  If this class is regenerated by
//  Microsoft Visual C++, your modifications will be overwritten.


#include "stdafx.h"
#include "hvdevice.h"

/////////////////////////////////////////////////////////////////////////////
// CHVDevice

IMPLEMENT_DYNCREATE(CHVDevice, CWnd)

/////////////////////////////////////////////////////////////////////////////
// CHVDevice properties

short CHVDevice::GetResolution()
{
	short result;
	GetProperty(0x1, VT_I2, (void*)&result);
	return result;
}

void CHVDevice::SetResolution(short propVal)
{
	SetProperty(0x1, VT_I2, propVal);
}

short CHVDevice::GetBayerToRGBConversion()
{
	short result;
	GetProperty(0x2, VT_I2, (void*)&result);
	return result;
}

void CHVDevice::SetBayerToRGBConversion(short propVal)
{
	SetProperty(0x2, VT_I2, propVal);
}

long CHVDevice::GetShutter()
{
	long result;
	GetProperty(0x3, VT_I4, (void*)&result);
	return result;
}

void CHVDevice::SetShutter(long propVal)
{
	SetProperty(0x3, VT_I4, propVal);
}

long CHVDevice::GetGain()
{
	long result;
	GetProperty(0x4, VT_I4, (void*)&result);
	return result;
}

void CHVDevice::SetGain(long propVal)
{
	SetProperty(0x4, VT_I4, propVal);
}

short CHVDevice::GetConversionType()
{
	short result;
	GetProperty(0x5, VT_I2, (void*)&result);
	return result;
}

void CHVDevice::SetConversionType(short propVal)
{
	SetProperty(0x5, VT_I2, propVal);
}

short CHVDevice::GetADCLevel()
{
	short result;
	GetProperty(0x6, VT_I2, (void*)&result);
	return result;
}

void CHVDevice::SetADCLevel(short propVal)
{
	SetProperty(0x6, VT_I2, propVal);
}

long CHVDevice::GetGainR()
{
	long result;
	GetProperty(0x7, VT_I4, (void*)&result);
	return result;
}

void CHVDevice::SetGainR(long propVal)
{
	SetProperty(0x7, VT_I4, propVal);
}

long CHVDevice::GetGainB()
{
	long result;
	GetProperty(0x8, VT_I4, (void*)&result);
	return result;
}

void CHVDevice::SetGainB(long propVal)
{
	SetProperty(0x8, VT_I4, propVal);
}

short CHVDevice::GetDeviceNumber()
{
	short result;
	GetProperty(0x9, VT_I2, (void*)&result);
	return result;
}

void CHVDevice::SetDeviceNumber(short propVal)
{
	SetProperty(0x9, VT_I2, propVal);
}

OLE_COLOR CHVDevice::GetBackColor()
{
	OLE_COLOR result;
	GetProperty(DISPID_BACKCOLOR, VT_I4, (void*)&result);
	return result;
}

void CHVDevice::SetBackColor(OLE_COLOR propVal)
{
	SetProperty(DISPID_BACKCOLOR, VT_I4, propVal);
}

short CHVDevice::GetBorderStyle()
{
	short result;
	GetProperty(DISPID_BORDERSTYLE, VT_I2, (void*)&result);
	return result;
}

void CHVDevice::SetBorderStyle(short propVal)
{
	SetProperty(DISPID_BORDERSTYLE, VT_I2, propVal);
}

short CHVDevice::GetAppearance()
{
	short result;
	GetProperty(DISPID_APPEARANCE, VT_I2, (void*)&result);
	return result;
}

void CHVDevice::SetAppearance(short propVal)
{
	SetProperty(DISPID_APPEARANCE, VT_I2, propVal);
}

OLE_COLOR CHVDevice::GetForeColor()
{
	OLE_COLOR result;
	GetProperty(DISPID_FORECOLOR, VT_I4, (void*)&result);
	return result;
}

void CHVDevice::SetForeColor(OLE_COLOR propVal)
{
	SetProperty(DISPID_FORECOLOR, VT_I4, propVal);
}

OLE_HANDLE CHVDevice::GetHWnd()
{
	OLE_HANDLE result;
	GetProperty(DISPID_HWND, VT_I4, (void*)&result);
	return result;
}

void CHVDevice::SetHWnd(OLE_HANDLE propVal)
{
	SetProperty(DISPID_HWND, VT_I4, propVal);
}

short CHVDevice::GetSnapSpeed()
{
	short result;
	GetProperty(0xa, VT_I2, (void*)&result);
	return result;
}

void CHVDevice::SetSnapSpeed(short propVal)
{
	SetProperty(0xa, VT_I2, propVal);
}

short CHVDevice::GetSnapMode()
{
	short result;
	GetProperty(0xb, VT_I2, (void*)&result);
	return result;
}

void CHVDevice::SetSnapMode(short propVal)
{
	SetProperty(0xb, VT_I2, propVal);
}

short CHVDevice::GetTriggerPolarity()
{
	short result;
	GetProperty(0xc, VT_I2, (void*)&result);
	return result;
}

void CHVDevice::SetTriggerPolarity(short propVal)
{
	SetProperty(0xc, VT_I2, propVal);
}

short CHVDevice::GetStrobePolarity()
{
	short result;
	GetProperty(0xd, VT_I2, (void*)&result);
	return result;
}

void CHVDevice::SetStrobePolarity(short propVal)
{
	SetProperty(0xd, VT_I2, propVal);
}

short CHVDevice::GetBlackLevelEnable()
{
	short result;
	GetProperty(0xe, VT_I2, (void*)&result);
	return result;
}

void CHVDevice::SetBlackLevelEnable(short propVal)
{
	SetProperty(0xe, VT_I2, propVal);
}

long CHVDevice::GetBlackLevel()
{
	long result;
	GetProperty(0xf, VT_I4, (void*)&result);
	return result;
}

void CHVDevice::SetBlackLevel(long propVal)
{
	SetProperty(0xf, VT_I4, propVal);
}

/////////////////////////////////////////////////////////////////////////////
// CHVDevice operations

void CHVDevice::GrabSingle()
{
	InvokeHelper(0x10, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CHVDevice::GrabContinuous()
{
	InvokeHelper(0x11, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CHVDevice::GrabCancel()
{
	InvokeHelper(0x12, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CHVDevice::Continue()
{
	InvokeHelper(0x13, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CHVDevice::AutoWhiteBalance()
{
	InvokeHelper(0x14, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CHVDevice::SetAOI(long left, long top, long width, long height)
{
	static BYTE parms[] =
		VTS_I4 VTS_I4 VTS_I4 VTS_I4;
	InvokeHelper(0x15, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		 left, top, width, height);
}

double CHVDevice::GetFrameRate()
{
	double result;
	InvokeHelper(0x16, DISPATCH_METHOD, VT_R8, (void*)&result, NULL);
	return result;
}

void CHVDevice::Draw(long DestLeft, long DestTop, long DestWidth, long DestHeight, long SrcLeft, long SrcTop, long SrcWidth, long SrcHeight)
{
	static BYTE parms[] =
		VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4 VTS_I4;
	InvokeHelper(0x17, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		 DestLeft, DestTop, DestWidth, DestHeight, SrcLeft, SrcTop, SrcWidth, SrcHeight);
}

void CHVDevice::MaximizeAOI()
{
	InvokeHelper(0x18, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

void CHVDevice::SaveImage(LPCTSTR FileName)
{
	static BYTE parms[] =
		VTS_BSTR;
	InvokeHelper(0x19, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		 FileName);
}

void CHVDevice::GetPropertyValueRange(long PropertyID, long* Min, long* Max)
{
	static BYTE parms[] =
		VTS_I4 VTS_PI4 VTS_PI4;
	InvokeHelper(0x1a, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		 PropertyID, Min, Max);
}

void CHVDevice::GetSensorSize(short Resolution, long* width, long* height)
{
	static BYTE parms[] =
		VTS_I2 VTS_PI4 VTS_PI4;
	InvokeHelper(0x1b, DISPATCH_METHOD, VT_EMPTY, NULL, parms,
		 Resolution, width, height);
}

long CHVDevice::GetBuffer()
{
	long result;
	InvokeHelper(0x1c, DISPATCH_METHOD, VT_I4, (void*)&result, NULL);
	return result;
}

void CHVDevice::AboutBox()
{
	InvokeHelper(0xfffffdd8, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -