mscomm.cpp
资源名称:SCommTest.rar [点击查看]
上传用户:oyxling
上传日期:2022-06-14
资源大小:1870k
文件大小:8k
源码类别:
串口编程
开发平台:
Visual C++
- // 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 "mscomm.h"
- /////////////////////////////////////////////////////////////////////////////
- // CMSComm
- IMPLEMENT_DYNCREATE(CMSComm, CWnd)
- /////////////////////////////////////////////////////////////////////////////
- // CMSComm properties
- /////////////////////////////////////////////////////////////////////////////
- // CMSComm operations
- void CMSComm::SetCDHolding(BOOL bNewValue)
- {
- static BYTE parms[] =
- VTS_BOOL;
- InvokeHelper(0x1, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- bNewValue);
- }
- BOOL CMSComm::GetCDHolding()
- {
- BOOL result;
- InvokeHelper(0x1, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetCommID(long nNewValue)
- {
- static BYTE parms[] =
- VTS_I4;
- InvokeHelper(0x3, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- nNewValue);
- }
- long CMSComm::GetCommID()
- {
- long result;
- InvokeHelper(0x3, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetCommPort(short nNewValue)
- {
- static BYTE parms[] =
- VTS_I2;
- InvokeHelper(0x4, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- nNewValue);
- }
- short CMSComm::GetCommPort()
- {
- short result;
- InvokeHelper(0x4, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetCTSHolding(BOOL bNewValue)
- {
- static BYTE parms[] =
- VTS_BOOL;
- InvokeHelper(0x5, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- bNewValue);
- }
- BOOL CMSComm::GetCTSHolding()
- {
- BOOL result;
- InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetDSRHolding(BOOL bNewValue)
- {
- static BYTE parms[] =
- VTS_BOOL;
- InvokeHelper(0x7, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- bNewValue);
- }
- BOOL CMSComm::GetDSRHolding()
- {
- BOOL result;
- InvokeHelper(0x7, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetDTREnable(BOOL bNewValue)
- {
- static BYTE parms[] =
- VTS_BOOL;
- InvokeHelper(0x9, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- bNewValue);
- }
- BOOL CMSComm::GetDTREnable()
- {
- BOOL result;
- InvokeHelper(0x9, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetHandshaking(long nNewValue)
- {
- static BYTE parms[] =
- VTS_I4;
- InvokeHelper(0xa, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- nNewValue);
- }
- long CMSComm::GetHandshaking()
- {
- long result;
- InvokeHelper(0xa, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetInBufferSize(short nNewValue)
- {
- static BYTE parms[] =
- VTS_I2;
- InvokeHelper(0xb, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- nNewValue);
- }
- short CMSComm::GetInBufferSize()
- {
- short result;
- InvokeHelper(0xb, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetInBufferCount(short nNewValue)
- {
- static BYTE parms[] =
- VTS_I2;
- InvokeHelper(0xc, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- nNewValue);
- }
- short CMSComm::GetInBufferCount()
- {
- short result;
- InvokeHelper(0xc, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetBreak(BOOL bNewValue)
- {
- static BYTE parms[] =
- VTS_BOOL;
- InvokeHelper(0xd, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- bNewValue);
- }
- BOOL CMSComm::GetBreak()
- {
- BOOL result;
- InvokeHelper(0xd, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetInputLen(short nNewValue)
- {
- static BYTE parms[] =
- VTS_I2;
- InvokeHelper(0xe, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- nNewValue);
- }
- short CMSComm::GetInputLen()
- {
- short result;
- InvokeHelper(0xe, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetNullDiscard(BOOL bNewValue)
- {
- static BYTE parms[] =
- VTS_BOOL;
- InvokeHelper(0x10, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- bNewValue);
- }
- BOOL CMSComm::GetNullDiscard()
- {
- BOOL result;
- InvokeHelper(0x10, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetOutBufferSize(short nNewValue)
- {
- static BYTE parms[] =
- VTS_I2;
- InvokeHelper(0x11, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- nNewValue);
- }
- short CMSComm::GetOutBufferSize()
- {
- short result;
- InvokeHelper(0x11, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetOutBufferCount(short nNewValue)
- {
- static BYTE parms[] =
- VTS_I2;
- InvokeHelper(0x12, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- nNewValue);
- }
- short CMSComm::GetOutBufferCount()
- {
- short result;
- InvokeHelper(0x12, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetParityReplace(LPCTSTR lpszNewValue)
- {
- static BYTE parms[] =
- VTS_BSTR;
- InvokeHelper(0x13, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- lpszNewValue);
- }
- CString CMSComm::GetParityReplace()
- {
- CString result;
- InvokeHelper(0x13, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetPortOpen(BOOL bNewValue)
- {
- static BYTE parms[] =
- VTS_BOOL;
- InvokeHelper(0x14, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- bNewValue);
- }
- BOOL CMSComm::GetPortOpen()
- {
- BOOL result;
- InvokeHelper(0x14, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetRThreshold(short nNewValue)
- {
- static BYTE parms[] =
- VTS_I2;
- InvokeHelper(0x15, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- nNewValue);
- }
- short CMSComm::GetRThreshold()
- {
- short result;
- InvokeHelper(0x15, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetRTSEnable(BOOL bNewValue)
- {
- static BYTE parms[] =
- VTS_BOOL;
- InvokeHelper(0x16, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- bNewValue);
- }
- BOOL CMSComm::GetRTSEnable()
- {
- BOOL result;
- InvokeHelper(0x16, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetSettings(LPCTSTR lpszNewValue)
- {
- static BYTE parms[] =
- VTS_BSTR;
- InvokeHelper(0x17, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- lpszNewValue);
- }
- CString CMSComm::GetSettings()
- {
- CString result;
- InvokeHelper(0x17, DISPATCH_PROPERTYGET, VT_BSTR, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetSThreshold(short nNewValue)
- {
- static BYTE parms[] =
- VTS_I2;
- InvokeHelper(0x18, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- nNewValue);
- }
- short CMSComm::GetSThreshold()
- {
- short result;
- InvokeHelper(0x18, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetOutput(const VARIANT& newValue)
- {
- static BYTE parms[] =
- VTS_VARIANT;
- InvokeHelper(0x19, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- &newValue);
- }
- VARIANT CMSComm::GetOutput()
- {
- VARIANT result;
- InvokeHelper(0x19, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetInput(const VARIANT& newValue)
- {
- static BYTE parms[] =
- VTS_VARIANT;
- InvokeHelper(0x1a, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- &newValue);
- }
- VARIANT CMSComm::GetInput()
- {
- VARIANT result;
- InvokeHelper(0x1a, DISPATCH_PROPERTYGET, VT_VARIANT, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetCommEvent(short nNewValue)
- {
- static BYTE parms[] =
- VTS_I2;
- InvokeHelper(0x1b, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- nNewValue);
- }
- short CMSComm::GetCommEvent()
- {
- short result;
- InvokeHelper(0x1b, DISPATCH_PROPERTYGET, VT_I2, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetEOFEnable(BOOL bNewValue)
- {
- static BYTE parms[] =
- VTS_BOOL;
- InvokeHelper(0x1c, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- bNewValue);
- }
- BOOL CMSComm::GetEOFEnable()
- {
- BOOL result;
- InvokeHelper(0x1c, DISPATCH_PROPERTYGET, VT_BOOL, (void*)&result, NULL);
- return result;
- }
- void CMSComm::SetInputMode(long nNewValue)
- {
- static BYTE parms[] =
- VTS_I4;
- InvokeHelper(0x1d, DISPATCH_PROPERTYPUT, VT_EMPTY, NULL, parms,
- nNewValue);
- }
- long CMSComm::GetInputMode()
- {
- long result;
- InvokeHelper(0x1d, DISPATCH_PROPERTYGET, VT_I4, (void*)&result, NULL);
- return result;
- }