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

📄 hdcomm.cpp

📁 很好的热敏打印机测试程序VC编写
💻 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 "hdcomm.h"

/////////////////////////////////////////////////////////////////////////////
// CHDComm

IMPLEMENT_DYNCREATE(CHDComm, CWnd)

/////////////////////////////////////////////////////////////////////////////
// CHDComm properties

CString CHDComm::GetCommPort()
{
	CString result;
	GetProperty(0x1, VT_BSTR, (void*)&result);
	return result;
}

void CHDComm::SetCommPort(LPCTSTR propVal)
{
	SetProperty(0x1, VT_BSTR, propVal);
}

CString CHDComm::GetSettings()
{
	CString result;
	GetProperty(0x2, VT_BSTR, (void*)&result);
	return result;
}

void CHDComm::SetSettings(LPCTSTR propVal)
{
	SetProperty(0x2, VT_BSTR, propVal);
}

CString CHDComm::GetXonChar()
{
	CString result;
	GetProperty(0x3, VT_BSTR, (void*)&result);
	return result;
}

void CHDComm::SetXonChar(LPCTSTR propVal)
{
	SetProperty(0x3, VT_BSTR, propVal);
}

CString CHDComm::GetXoffChar()
{
	CString result;
	GetProperty(0x4, VT_BSTR, (void*)&result);
	return result;
}

void CHDComm::SetXoffChar(LPCTSTR propVal)
{
	SetProperty(0x4, VT_BSTR, propVal);
}

CString CHDComm::GetErrorReplacedChar()
{
	CString result;
	GetProperty(0x5, VT_BSTR, (void*)&result);
	return result;
}

void CHDComm::SetErrorReplacedChar(LPCTSTR propVal)
{
	SetProperty(0x5, VT_BSTR, propVal);
}

BOOL CHDComm::GetSendDataEmpty()
{
	BOOL result;
	GetProperty(0x6, VT_BOOL, (void*)&result);
	return result;
}

void CHDComm::SetSendDataEmpty(BOOL propVal)
{
	SetProperty(0x6, VT_BOOL, propVal);
}

BOOL CHDComm::GetWriteCommLog()
{
	BOOL result;
	GetProperty(0x7, VT_BOOL, (void*)&result);
	return result;
}

void CHDComm::SetWriteCommLog(BOOL propVal)
{
	SetProperty(0x7, VT_BOOL, propVal);
}

BOOL CHDComm::GetReadCommLog()
{
	BOOL result;
	GetProperty(0x8, VT_BOOL, (void*)&result);
	return result;
}

void CHDComm::SetReadCommLog(BOOL propVal)
{
	SetProperty(0x8, VT_BOOL, propVal);
}

BOOL CHDComm::GetParityCheck()
{
	BOOL result;
	GetProperty(0x9, VT_BOOL, (void*)&result);
	return result;
}

void CHDComm::SetParityCheck(BOOL propVal)
{
	SetProperty(0x9, VT_BOOL, propVal);
}

BOOL CHDComm::GetOutxCtsFlow()
{
	BOOL result;
	GetProperty(0xa, VT_BOOL, (void*)&result);
	return result;
}

void CHDComm::SetOutxCtsFlow(BOOL propVal)
{
	SetProperty(0xa, VT_BOOL, propVal);
}

BOOL CHDComm::GetOutxDsrFlow()
{
	BOOL result;
	GetProperty(0xb, VT_BOOL, (void*)&result);
	return result;
}

void CHDComm::SetOutxDsrFlow(BOOL propVal)
{
	SetProperty(0xb, VT_BOOL, propVal);
}

BOOL CHDComm::GetDsrSensitivity()
{
	BOOL result;
	GetProperty(0xc, VT_BOOL, (void*)&result);
	return result;
}

void CHDComm::SetDsrSensitivity(BOOL propVal)
{
	SetProperty(0xc, VT_BOOL, propVal);
}

BOOL CHDComm::GetTxContinueOnXoff()
{
	BOOL result;
	GetProperty(0xd, VT_BOOL, (void*)&result);
	return result;
}

void CHDComm::SetTxContinueOnXoff(BOOL propVal)
{
	SetProperty(0xd, VT_BOOL, propVal);
}

BOOL CHDComm::GetOutxXonXoffFlow()
{
	BOOL result;
	GetProperty(0xe, VT_BOOL, (void*)&result);
	return result;
}

void CHDComm::SetOutxXonXoffFlow(BOOL propVal)
{
	SetProperty(0xe, VT_BOOL, propVal);
}

BOOL CHDComm::GetInxXonXoffFlow()
{
	BOOL result;
	GetProperty(0xf, VT_BOOL, (void*)&result);
	return result;
}

void CHDComm::SetInxXonXoffFlow(BOOL propVal)
{
	SetProperty(0xf, VT_BOOL, propVal);
}

BOOL CHDComm::GetReplaceWhenParityError()
{
	BOOL result;
	GetProperty(0x10, VT_BOOL, (void*)&result);
	return result;
}

void CHDComm::SetReplaceWhenParityError(BOOL propVal)
{
	SetProperty(0x10, VT_BOOL, propVal);
}

BOOL CHDComm::GetIgnoreNullChar()
{
	BOOL result;
	GetProperty(0x11, VT_BOOL, (void*)&result);
	return result;
}

void CHDComm::SetIgnoreNullChar(BOOL propVal)
{
	SetProperty(0x11, VT_BOOL, propVal);
}

long CHDComm::GetXonLimit()
{
	long result;
	GetProperty(0x12, VT_I4, (void*)&result);
	return result;
}

void CHDComm::SetXonLimit(long propVal)
{
	SetProperty(0x12, VT_I4, propVal);
}

long CHDComm::GetXoffLimit()
{
	long result;
	GetProperty(0x13, VT_I4, (void*)&result);
	return result;
}

void CHDComm::SetXoffLimit(long propVal)
{
	SetProperty(0x13, VT_I4, propVal);
}

long CHDComm::GetReadIntervalTimeout()
{
	long result;
	GetProperty(0x14, VT_I4, (void*)&result);
	return result;
}

void CHDComm::SetReadIntervalTimeout(long propVal)
{
	SetProperty(0x14, VT_I4, propVal);
}

long CHDComm::GetReadTotalTimeoutMultiplier()
{
	long result;
	GetProperty(0x15, VT_I4, (void*)&result);
	return result;
}

void CHDComm::SetReadTotalTimeoutMultiplier(long propVal)
{
	SetProperty(0x15, VT_I4, propVal);
}

long CHDComm::GetReadTotalTimeoutConstant()
{
	long result;
	GetProperty(0x16, VT_I4, (void*)&result);
	return result;
}

void CHDComm::SetReadTotalTimeoutConstant(long propVal)
{
	SetProperty(0x16, VT_I4, propVal);
}

long CHDComm::GetWriteTotalTimeoutMultiplier()
{
	long result;
	GetProperty(0x17, VT_I4, (void*)&result);
	return result;
}

void CHDComm::SetWriteTotalTimeoutMultiplier(long propVal)
{
	SetProperty(0x17, VT_I4, propVal);
}

long CHDComm::GetWriteTotalTimeoutConstant()
{
	long result;
	GetProperty(0x18, VT_I4, (void*)&result);
	return result;
}

void CHDComm::SetWriteTotalTimeoutConstant(long propVal)
{
	SetProperty(0x18, VT_I4, propVal);
}

short CHDComm::GetDtrControl()
{
	short result;
	GetProperty(0x19, VT_I2, (void*)&result);
	return result;
}

void CHDComm::SetDtrControl(short propVal)
{
	SetProperty(0x19, VT_I2, propVal);
}

short CHDComm::GetRtsControl()
{
	short result;
	GetProperty(0x1a, VT_I2, (void*)&result);
	return result;
}

void CHDComm::SetRtsControl(short propVal)
{
	SetProperty(0x1a, VT_I2, propVal);
}

/////////////////////////////////////////////////////////////////////////////
// CHDComm operations

CString CHDComm::EnumComPorts()
{
	CString result;
	InvokeHelper(0x1b, DISPATCH_METHOD, VT_BSTR, (void*)&result, NULL);
	return result;
}

BOOL CHDComm::StartComm()
{
	BOOL result;
	InvokeHelper(0x1c, DISPATCH_METHOD, VT_BOOL, (void*)&result, NULL);
	return result;
}

void CHDComm::StopComm()
{
	InvokeHelper(0x1d, DISPATCH_METHOD, VT_EMPTY, NULL, NULL);
}

long CHDComm::GetModemState()
{
	long result;
	InvokeHelper(0x1e, DISPATCH_METHOD, VT_I4, (void*)&result, NULL);
	return result;
}

CString CHDComm::GetVersionInfo()
{
	CString result;
	InvokeHelper(0x1f, DISPATCH_METHOD, VT_BSTR, (void*)&result, NULL);
	return result;
}

BOOL CHDComm::WriteCommData(long* Buffer, long BufferLength)
{
	BOOL result;
	static BYTE parms[] =
		VTS_PI4 VTS_I4;
	InvokeHelper(0x20, DISPATCH_METHOD, VT_BOOL, (void*)&result, parms,
		Buffer, BufferLength);
	return result;
}

⌨️ 快捷键说明

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