📄 dlprinterportioxcontrol_tlb.h
字号:
{
BSTR Value;
get_LastError(&Value);
return Value;
}
HRESULT /*[VT_HRESULT:0]*/ get_Visible(VARIANT_BOOL* Value/*[out,retval]*/)
{
static _TDispID _dispid(*this, OLETEXT("Visible"), DISPID(37));
TAutoArgs<0> _args;
return OutRetValSetterPtr(Value /*[VT_BOOL:1]*/, _args, OlePropertyGet(_dispid, _args));
}
VARIANT_BOOL get_Visible(void)
{
VARIANT_BOOL Value;
get_Visible(&Value);
return Value;
}
HRESULT /*[VT_HRESULT:0]*/ set_Visible(VARIANT_BOOL Value/*[in]*/)
{
static _TDispID _dispid(*this, OLETEXT("Visible"), DISPID(37));
TAutoArgs<1> _args;
_args[1] = Value /*[VT_BOOL:0]*/;
return OlePropertyPut(_dispid, _args);
}
HRESULT /*[VT_HRESULT:0]*/ get_Enabled(VARIANT_BOOL* Value/*[out,retval]*/)
{
static _TDispID _dispid(*this, OLETEXT("Enabled"), DISPID(-514));
TAutoArgs<0> _args;
return OutRetValSetterPtr(Value /*[VT_BOOL:1]*/, _args, OlePropertyGet(_dispid, _args));
}
VARIANT_BOOL get_Enabled(void)
{
VARIANT_BOOL Value;
get_Enabled(&Value);
return Value;
}
HRESULT /*[VT_HRESULT:0]*/ set_Enabled(VARIANT_BOOL Value/*[in]*/)
{
static _TDispID _dispid(*this, OLETEXT("Enabled"), DISPID(-514));
TAutoArgs<1> _args;
_args[1] = Value /*[VT_BOOL:0]*/;
return OlePropertyPut(_dispid, _args);
}
HRESULT /*[VT_HRESULT:0]*/ get_Cursor(short* Value/*[out,retval]*/)
{
static _TDispID _dispid(*this, OLETEXT("Cursor"), DISPID(38));
TAutoArgs<0> _args;
return OutRetValSetterPtr(Value /*[VT_I2:1]*/, _args, OlePropertyGet(_dispid, _args));
}
short get_Cursor(void)
{
short Value;
get_Cursor(&Value);
return Value;
}
HRESULT /*[VT_HRESULT:0]*/ set_Cursor(short Value/*[in]*/)
{
static _TDispID _dispid(*this, OLETEXT("Cursor"), DISPID(38));
TAutoArgs<1> _args;
_args[1] = Value /*[VT_I2:0]*/;
return OlePropertyPut(_dispid, _args);
}
HRESULT /*[VT_HRESULT:0]*/ ClassNameIs(BSTR string/*[in]*/,VARIANT_BOOL* Value/*[out,retval]*/)
{
static _TDispID _dispid(*this, OLETEXT("ClassNameIs"), DISPID(40));
TAutoArgs<1> _args;
_args[1] = string /*[VT_BSTR:0]*/;
return OutRetValSetterPtr(Value /*[VT_BOOL:1]*/, _args, OleFunction(_dispid, _args));
}
HRESULT /*[VT_HRESULT:0]*/ AboutBox()
{
static _TDispID _dispid(*this, OLETEXT("AboutBox"), DISPID(-552));
return OleFunction(_dispid);
}
__property VARIANT_BOOL LPTAckwl = {read = get_LPTAckwl};
__property VARIANT_BOOL LPTBusy = {read = get_LPTBusy};
__property VARIANT_BOOL LPTPaperEnd = {read = get_LPTPaperEnd};
__property VARIANT_BOOL LPTSlct = {read = get_LPTSlct};
__property VARIANT_BOOL LPTError = {read = get_LPTError};
__property unsigned char LPTNumPorts = {read = get_LPTNumPorts};
__property unsigned char LPTNumber = {read = get_LPTNumber, write = set_LPTNumber};
__property short LPTBasePort = {read = get_LPTBasePort};
__property BSTR DriverPath = {read = get_DriverPath, write = set_DriverPath};
__property BSTR DLLPath = {read = get_DLLPath, write = set_DLLPath};
__property VARIANT_BOOL ActiveHW = {read = get_ActiveHW};
__property VARIANT_BOOL HardAccess = {read = get_HardAccess, write = set_HardAccess};
__property BSTR LastError = {read = get_LastError};
__property VARIANT_BOOL Visible = {read = get_Visible, write = set_Visible};
__property VARIANT_BOOL Enabled = {read = get_Enabled, write = set_Enabled};
__property short Cursor = {read = get_Cursor, write = set_Cursor};
};
// *********************************************************************//
// Interface: IDLPrinterPortIOXEvents
// Flags: (0)
// GUID: {0CF882A3-36E5-11D3-AEA1-02608CA7A319}
// *********************************************************************//
interface IDLPrinterPortIOXEvents : public IDispatch
{
// DispInterfaces have no methods. Their methods and properties are
// accessed via IDispatch::Invoke. See the class IDLPrinterPortIOXEventsDisp provided
// below for an easy way to access the methods/properties of this
// interface.
};
// *********************************************************************//
// DispIntf: IDLPrinterPortIOXEvents
// Flags: (0)
// GUID: {0CF882A3-36E5-11D3-AEA1-02608CA7A319}
// *********************************************************************//
class IDLPrinterPortIOXEventsDisp : public TAutoDriver<IDLPrinterPortIOXEvents>
{
typedef TDispId<IDLPrinterPortIOXEvents> _TDispID;
public:
IDLPrinterPortIOXEventsDisp()
{}
IDLPrinterPortIOXEventsDisp& operator=(IDLPrinterPortIOXEvents *pintf)
{
TAutoDriver<IDLPrinterPortIOXEvents>::Bind(pintf);
}
};
// *********************************************************************//
// OCX PROXY CLASS DECLARATION
// Control Name : TDLPrinterPortIOXProxy
// Help String : DLPrinterPortIOX Control
// Default Interface: IDLPrinterPortIOX
// Def. Intf. Object: TCOMIDLPrinterPortIOX
// Def. Intf. DISP? : No
// Event Interface: IDLPrinterPortIOXEvents
// *********************************************************************//
// *********************************************************************//
// Definition of closures to allow VCL handlers to catch OCX events. //
// *********************************************************************//
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
// Proxy class to host DLPrinterPortIOX Control in CBuilder IDE/Applications.
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
class PACKAGE TDLPrinterPortIOXProxy : public TOCXProxy
{
private:
// Instance of Closures to expose OCX Events as VCL ones
//
// Default Interace of OCX
//
TCOMIDLPrinterPortIOX m_OCXIntf;
// VCL Property Getters/Setters which delegate to OCX
//
// Static variables used by all instances of OCX proxy
//
static TControlData CControlData;
// Method providing access to interface as __property
//
TCOMIDLPrinterPortIOX __fastcall GetControlInterface(void);
protected:
void __fastcall CreateControl (void);
void __fastcall InitControlData(void);
public:
virtual __fastcall TDLPrinterPortIOXProxy(TComponent* AOwner) : TOCXProxy(AOwner)
{};
virtual __fastcall TDLPrinterPortIOXProxy(HWND Parent) : TOCXProxy(Parent)
{};
// OCX methods
//
void/*HRESULT*/ __fastcall LPTStrobe(void);
void/*HRESULT*/ __fastcall LPTAutofd(VARIANT_BOOL Flag/*[in]*/);
void/*HRESULT*/ __fastcall LPTInit(void);
void/*HRESULT*/ __fastcall LPTSlctIn(void);
VARIANT_BOOL __fastcall LPTPrintChar(short Ch/*[in]*/);
VARIANT_BOOL __fastcall GetPin(unsigned char Index/*[in]*/);
void/*HRESULT*/ __fastcall SetPin(unsigned char Index/*[in]*/, VARIANT_BOOL State/*[in]*/);
void/*HRESULT*/ __fastcall OpenDriver(void);
void/*HRESULT*/ __fastcall CloseDriver(void);
void/*HRESULT*/ __fastcall ReadPortFIFO(short PortAddr/*[in]*/, short NumPorts/*[in]*/,
unsigned char Buffer/*[in]*/);
void/*HRESULT*/ __fastcall WritePortFIFO(short PortAddr/*[in]*/, short NumPorts/*[in]*/,
unsigned char Buffer/*[in]*/);
void/*HRESULT*/ __fastcall ReadWPortFIFO(short PortAddr/*[in]*/, short NumPorts/*[in]*/,
short Buffer/*[in]*/);
void/*HRESULT*/ __fastcall WriteWPortFIFO(short PortAddr/*[in]*/, short NumPorts/*[in]*/,
short Buffer/*[in]*/);
void/*HRESULT*/ __fastcall ReadLPortFIFO(short PortAddr/*[in]*/, short NumPorts/*[in]*/,
long Buffer/*[in]*/);
void/*HRESULT*/ __fastcall WriteLPortFIFO(short PortAddr/*[in]*/, short NumPorts/*[in]*/,
long Buffer/*[in]*/);
unsigned char __fastcall ReadPort(short Address/*[in]*/);
void/*HRESULT*/ __fastcall WritePort(short Address/*[in]*/, unsigned char Data/*[in]*/);
short __fastcall ReadPortW(short Address/*[in]*/);
void/*HRESULT*/ __fastcall WritePortW(short Address/*[in]*/, short Data/*[in]*/);
long __fastcall ReadPortL(short Address/*[in]*/);
void/*HRESULT*/ __fastcall WritePortL(short Address/*[in]*/, long Data/*[in]*/);
VARIANT_BOOL __fastcall ClassNameIs(BSTR string/*[in]*/);
void/*HRESULT*/ __fastcall AboutBox(void);
// OCX properties
//
__property Word LPTAckwl={ read=GetWordBoolProp, index=8 };
__property Word LPTBusy={ read=GetWordBoolProp, index=9 };
__property Word LPTPaperEnd={ read=GetWordBoolProp, index=10 };
__property Word LPTSlct={ read=GetWordBoolProp, index=11 };
__property Word LPTError={ read=GetWordBoolProp, index=12 };
__property Byte LPTNumPorts={ read=GetByteProp, index=13 };
__property short LPTBasePort={ read=GetSmallintProp, index=15 };
__property Word ActiveHW={ read=GetWordBoolProp, index=32 };
__property System::WideString LastError={ read=GetWideStringProp, index=34 };
__property TCOMIDLPrinterPortIOX ControlInterface={ read=GetControlInterface };
// Published properties
//
__published:
// Standard properties
//
// OCX properties
//
__property Byte LPTNumber={ read=GetByteProp, write=SetByteProp, stored=false, index=14 };
__property System::WideString DriverPath={ read=GetWideStringProp, write=SetWideStringProp, stored=false, index=30 };
__property System::WideString DLLPath={ read=GetWideStringProp, write=SetWideStringProp, stored=false, index=31 };
__property Word HardAccess={ read=GetWordBoolProp, write=SetWordBoolProp, stored=false, index=33 };
__property Word Visible={ read=GetWordBoolProp, write=SetWordBoolProp, stored=false, index=37 };
__property Word Enabled={ read=GetWordBoolProp, write=SetWordBoolProp, stored=false, index=-514 };
__property short Cursor={ read=GetSmallintProp, write=SetSmallintProp, stored=false, index=38 };
// OCX Events
//
};
#if defined(USING_ATL) || defined(USING_ATLVCL)
// *********************************************************************//
// CONNECTIONPOINT/EVENT PROXY
// CoClass : DLPrinterPortIOX
// Event Interface : IDLPrinterPortIOXEvents
// *********************************************************************//
template <class T>
class TEvents_DLPrinterPortIOX : public IConnectionPointImpl<T, &DIID_IDLPrinterPortIOXEvents, CComUnkArray<CONNECTIONPOINT_ARRAY_SIZE> >
{
public:
};
#endif // USING_ATL || USING_ATLVCL
}; // namespace Dlprinterportioxcontrol_tlb
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Dlprinterportioxcontrol_tlb;
#endif
#pragma option pop
#endif // __DLPrinterPortIOXControl_TLB_h__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -