unit Scale1C_TLB; // ************************************************************************ // // WARNING // ------- // The types declared in this file were generated from data read from a // Type Library. If this type library is explicitly or indirectly (via // another type library referring to this type library) re-imported, or the // 'Refresh' command of the Type Library Editor activated while editing the // Type Library, the contents of this file will be regenerated and all // manual modifications will be lost. // ************************************************************************ // // PASTLWTR : $Revision: 1.88.1.0.1.0 $ // File generated on 15.11.2005 20:20:19 from Type Library described below. // ************************************************************************ // // Type Lib: E:\Projects\ScaleDrv\Source\Scale1C\Scale1C.tlb (1) // IID\LCID: {DCD43EE9-B38D-11D3-9DE1-0000E8DBEDCE}\0 // Helpfile: // DepndLst: // (1) v1.0 stdole, (C:\WINDOWS\system32\stdole32.tlb) // (2) v1.0 StdVCL, (C:\WINDOWS\system32\STDVCL32.DLL) // ************************************************************************ // {$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers. interface uses Windows, ActiveX, Classes, Graphics, OleServer, OleCtrls, StdVCL; // *********************************************************************// // GUIDS declared in the TypeLibrary. Following prefixes are used: // Type Libraries : LIBID_xxxx // CoClasses : CLASS_xxxx // DISPInterfaces : DIID_xxxx // Non-DISP interfaces: IID_xxxx // *********************************************************************// const // TypeLibrary Major and minor versions Scale1CMajorVersion = 5; Scale1CMinorVersion = 2; LIBID_Scale1C: TGUID = '{DCD43EE9-B38D-11D3-9DE1-0000E8DBEDCE}'; IID_IScale1C: TGUID = '{DCD43EE8-B38D-11D3-9DE1-0000E8DBEDCE}'; DIID_IScaleEvents: TGUID = '{DCD43EE7-B38D-11D3-9DE1-0000E8DBEDCE}'; CLASS_Scale45: TGUID = '{DCD43EE6-B38D-11D3-9DE1-0000E8DBEDCE}'; type // *********************************************************************// // Forward declaration of types defined in TypeLibrary // *********************************************************************// IScale1C = interface; IScale1CDisp = dispinterface; IScaleEvents = dispinterface; // *********************************************************************// // Declaration of CoClasses defined in Type Library // (NOTE: Here we map each CoClass to its Default Interface) // *********************************************************************// Scale45 = IScale1C; // *********************************************************************// // Interface: IScale1C // Flags: (4432) Hidden Dual OleAutomation Dispatchable // GUID: {DCD43EE8-B38D-11D3-9DE1-0000E8DBEDCE} // *********************************************************************// IScale1C = interface(IDispatch) ['{DCD43EE8-B38D-11D3-9DE1-0000E8DBEDCE}'] function Get_ResultCode: Integer; safecall; function Get_ResultDescription: WideString; safecall; function Get_Version: WideString; safecall; function Get_CurrentDeviceIndex: Integer; safecall; procedure Set_CurrentDeviceIndex(Value: Integer); safecall; function Get_CurrentDeviceNumber: Integer; safecall; procedure Set_CurrentDeviceNumber(Value: Integer); safecall; function Get_CurrentDeviceName: WideString; safecall; procedure Set_CurrentDeviceName(const Value: WideString); safecall; function Get_DeviceCount: Integer; safecall; function Get_LockDevices: WordBool; safecall; procedure Set_LockDevices(Value: WordBool); safecall; function Get_DeviceDescription: WideString; safecall; function Get_PollingInterval: Integer; safecall; procedure Set_PollingInterval(Value: Integer); safecall; function Get_EventNumber: Integer; safecall; procedure Set_EventNumber(Value: Integer); safecall; function Get_DataCount: Integer; safecall; function Get_WeightStep: Double; safecall; procedure Set_WeightStep(Value: Double); safecall; function Get_Model: Integer; safecall; procedure Set_Model(Value: Integer); safecall; function Get_AsyncMode: WordBool; safecall; procedure Set_AsyncMode(Value: WordBool); safecall; function Get_PortNumber: Integer; safecall; procedure Set_PortNumber(Value: Integer); safecall; function Get_BaudRate: Integer; safecall; procedure Set_BaudRate(Value: Integer); safecall; function Get_Parity: Integer; safecall; procedure Set_Parity(Value: Integer); safecall; function Get_DeviceEnabled: WordBool; safecall; procedure Set_DeviceEnabled(Value: WordBool); safecall; function Get_UnitPrice: Currency; safecall; procedure Set_UnitPrice(Value: Currency); safecall; function Get_SalesPrice: Currency; safecall; function Get_Weight: Double; safecall; function Get_TareWeight: Double; safecall; procedure Set_TareWeight(Value: Double); safecall; function Get_NettoWeight: WordBool; safecall; function Get_AutoZeroMode: WordBool; safecall; function Get_OutOfZero: WordBool; safecall; function Get_NegWeight: WordBool; safecall; function Get_BigWeight: WordBool; safecall; function Get_NonStable: WordBool; safecall; function Get_Value: Integer; safecall; procedure Set_Value(Value: Integer); safecall; function Get_ValuePurpose: Integer; safecall; procedure Set_ValuePurpose(Value: Integer); safecall; function Get_UProtocolVersion: Integer; safecall; function Get_UType: Integer; safecall; function Get_UModel: Integer; safecall; function Get_UMode: Integer; safecall; function Get_UMajorVersion: Integer; safecall; function Get_UMinorVersion: Integer; safecall; function Get_UDescription: WideString; safecall; function Get_UCodePage: Integer; safecall; function Get_UBuild: Integer; safecall; function Get_UpdatePrice: WordBool; safecall; procedure Set_UpdatePrice(Value: WordBool); safecall; function Get_InvalidRange: WordBool; safecall; function Get_AutoDisable: WordBool; safecall; procedure Set_AutoDisable(Value: WordBool); safecall; function Get_DataEventEnabled: WordBool; safecall; procedure Set_DataEventEnabled(Value: WordBool); safecall; function Get_ApplicationHandle: Integer; safecall; procedure Set_ApplicationHandle(Value: Integer); safecall; function ShowProperties: Integer; safecall; function AddDevice: Integer; safecall; function DeleteDevice: Integer; safecall; function DeleteEvent: Integer; safecall; function ReadWeight: Integer; safecall; function ZeroScale: Integer; safecall; function Tare: Integer; safecall; function SetTareWeight: Integer; safecall; function GetDeviceMetrics: Integer; safecall; function GetValue: Integer; safecall; function SetValue: Integer; safecall; function Reset: Integer; safecall; function GenerateAsyncMessage: Integer; safecall; procedure AboutBox; safecall; function Get_IsDemo: WordBool; safecall; function Get_LogicalNumber: Integer; safecall; procedure Set_LogicalNumber(Value: Integer); safecall; property ResultCode: Integer read Get_ResultCode; property ResultDescription: WideString read Get_ResultDescription; property Version: WideString read Get_Version; property CurrentDeviceIndex: Integer read Get_CurrentDeviceIndex write Set_CurrentDeviceIndex; property CurrentDeviceNumber: Integer read Get_CurrentDeviceNumber write Set_CurrentDeviceNumber; property CurrentDeviceName: WideString read Get_CurrentDeviceName write Set_CurrentDeviceName; property DeviceCount: Integer read Get_DeviceCount; property LockDevices: WordBool read Get_LockDevices write Set_LockDevices; property DeviceDescription: WideString read Get_DeviceDescription; property PollingInterval: Integer read Get_PollingInterval write Set_PollingInterval; property EventNumber: Integer read Get_EventNumber write Set_EventNumber; property DataCount: Integer read Get_DataCount; property WeightStep: Double read Get_WeightStep write Set_WeightStep; property Model: Integer read Get_Model write Set_Model; property AsyncMode: WordBool read Get_AsyncMode write Set_AsyncMode; property PortNumber: Integer read Get_PortNumber write Set_PortNumber; property BaudRate: Integer read Get_BaudRate write Set_BaudRate; property Parity: Integer read Get_Parity write Set_Parity; property DeviceEnabled: WordBool read Get_DeviceEnabled write Set_DeviceEnabled; property UnitPrice: Currency read Get_UnitPrice write Set_UnitPrice; property SalesPrice: Currency read Get_SalesPrice; property Weight: Double read Get_Weight; property TareWeight: Double read Get_TareWeight write Set_TareWeight; property NettoWeight: WordBool read Get_NettoWeight; property AutoZeroMode: WordBool read Get_AutoZeroMode; property OutOfZero: WordBool read Get_OutOfZero; property NegWeight: WordBool read Get_NegWeight; property BigWeight: WordBool read Get_BigWeight; property NonStable: WordBool read Get_NonStable; property Value: Integer read Get_Value write Set_Value; property ValuePurpose: Integer read Get_ValuePurpose write Set_ValuePurpose; property UProtocolVersion: Integer read Get_UProtocolVersion; property UType: Integer read Get_UType; property UModel: Integer read Get_UModel; property UMode: Integer read Get_UMode; property UMajorVersion: Integer read Get_UMajorVersion; property UMinorVersion: Integer read Get_UMinorVersion; property UDescription: WideString read Get_UDescription; property UCodePage: Integer read Get_UCodePage; property UBuild: Integer read Get_UBuild; property UpdatePrice: WordBool read Get_UpdatePrice write Set_UpdatePrice; property InvalidRange: WordBool read Get_InvalidRange; property AutoDisable: WordBool read Get_AutoDisable write Set_AutoDisable; property DataEventEnabled: WordBool read Get_DataEventEnabled write Set_DataEventEnabled; property ApplicationHandle: Integer read Get_ApplicationHandle write Set_ApplicationHandle; property IsDemo: WordBool read Get_IsDemo; property LogicalNumber: Integer read Get_LogicalNumber write Set_LogicalNumber; end; // *********************************************************************// // DispIntf: IScale1CDisp // Flags: (4432) Hidden Dual OleAutomation Dispatchable // GUID: {DCD43EE8-B38D-11D3-9DE1-0000E8DBEDCE} // *********************************************************************// IScale1CDisp = dispinterface ['{DCD43EE8-B38D-11D3-9DE1-0000E8DBEDCE}'] property ResultCode: Integer readonly dispid 1; property ResultDescription: WideString readonly dispid 2; property Version: WideString readonly dispid 3; property CurrentDeviceIndex: Integer dispid 4; property CurrentDeviceNumber: Integer dispid 5; property CurrentDeviceName: WideString dispid 6; property DeviceCount: Integer readonly dispid 7; property LockDevices: WordBool dispid 8; property DeviceDescription: WideString readonly dispid 9; property PollingInterval: Integer dispid 10; property EventNumber: Integer dispid 11; property DataCount: Integer readonly dispid 12; property WeightStep: Double dispid 13; property Model: Integer dispid 14; property AsyncMode: WordBool dispid 15; property PortNumber: Integer dispid 16; property BaudRate: Integer dispid 17; property Parity: Integer dispid 18; property DeviceEnabled: WordBool dispid 19; property UnitPrice: Currency dispid 20; property SalesPrice: Currency readonly dispid 21; property Weight: Double readonly dispid 22; property TareWeight: Double dispid 23; property NettoWeight: WordBool readonly dispid 24; property AutoZeroMode: WordBool readonly dispid 25; property OutOfZero: WordBool readonly dispid 26; property NegWeight: WordBool readonly dispid 27; property BigWeight: WordBool readonly dispid 28; property NonStable: WordBool readonly dispid 29; property Value: Integer dispid 30; property ValuePurpose: Integer dispid 31; property UProtocolVersion: Integer readonly dispid 32; property UType: Integer readonly dispid 33; property UModel: Integer readonly dispid 34; property UMode: Integer readonly dispid 35; property UMajorVersion: Integer readonly dispid 36; property UMinorVersion: Integer readonly dispid 37; property UDescription: WideString readonly dispid 38; property UCodePage: Integer readonly dispid 39; property UBuild: Integer readonly dispid 40; property UpdatePrice: WordBool dispid 41; property InvalidRange: WordBool readonly dispid 42; property AutoDisable: WordBool dispid 43; property DataEventEnabled: WordBool dispid 44; property ApplicationHandle: Integer dispid 45; function ShowProperties: Integer; dispid 46; function AddDevice: Integer; dispid 47; function DeleteDevice: Integer; dispid 48; function DeleteEvent: Integer; dispid 49; function ReadWeight: Integer; dispid 50; function ZeroScale: Integer; dispid 51; function Tare: Integer; dispid 52; function SetTareWeight: Integer; dispid 53; function GetDeviceMetrics: Integer; dispid 54; function GetValue: Integer; dispid 55; function SetValue: Integer; dispid 56; function Reset: Integer; dispid 57; function GenerateAsyncMessage: Integer; dispid 58; procedure AboutBox; dispid -552; property IsDemo: WordBool readonly dispid 59; property LogicalNumber: Integer dispid 60; end; // *********************************************************************// // DispIntf: IScaleEvents // Flags: (4096) Dispatchable // GUID: {DCD43EE7-B38D-11D3-9DE1-0000E8DBEDCE} // *********************************************************************// IScaleEvents = dispinterface ['{DCD43EE7-B38D-11D3-9DE1-0000E8DBEDCE}'] procedure DataEvent; dispid 1; end; // *********************************************************************// // OLE Control Proxy class declaration // Control Name : TScale45 // Help String : АТОЛ: Драйвер электронных весов // Default Interface: IScale1C // Def. Intf. DISP? : No // Event Interface: IScaleEvents // TypeFlags : (34) CanCreate Control // *********************************************************************// TScale45 = class(TOleControl) private FOnDataEvent: TNotifyEvent; FIntf: IScale1C; function GetControlInterface: IScale1C; protected procedure CreateControl; procedure InitControlData; override; public function ShowProperties: Integer; function AddDevice: Integer; function DeleteDevice: Integer; function DeleteEvent: Integer; function ReadWeight: Integer; function ZeroScale: Integer; function Tare: Integer; function SetTareWeight: Integer; function GetDeviceMetrics: Integer; function GetValue: Integer; function SetValue: Integer; function Reset: Integer; function GenerateAsyncMessage: Integer; procedure AboutBox; property ControlInterface: IScale1C read GetControlInterface; property DefaultInterface: IScale1C read GetControlInterface; property ResultCode: Integer index 1 read GetIntegerProp; property ResultDescription: WideString index 2 read GetWideStringProp; property Version: WideString index 3 read GetWideStringProp; property DeviceCount: Integer index 7 read GetIntegerProp; property DeviceDescription: WideString index 9 read GetWideStringProp; property DataCount: Integer index 12 read GetIntegerProp; property SalesPrice: Currency index 21 read GetCurrencyProp; property Weight: Double index 22 read GetDoubleProp; property NettoWeight: WordBool index 24 read GetWordBoolProp; property AutoZeroMode: WordBool index 25 read GetWordBoolProp; property OutOfZero: WordBool index 26 read GetWordBoolProp; property NegWeight: WordBool index 27 read GetWordBoolProp; property BigWeight: WordBool index 28 read GetWordBoolProp; property NonStable: WordBool index 29 read GetWordBoolProp; property UProtocolVersion: Integer index 32 read GetIntegerProp; property UType: Integer index 33 read GetIntegerProp; property UModel: Integer index 34 read GetIntegerProp; property UMode: Integer index 35 read GetIntegerProp; property UMajorVersion: Integer index 36 read GetIntegerProp; property UMinorVersion: Integer index 37 read GetIntegerProp; property UDescription: WideString index 38 read GetWideStringProp; property UCodePage: Integer index 39 read GetIntegerProp; property UBuild: Integer index 40 read GetIntegerProp; property InvalidRange: WordBool index 42 read GetWordBoolProp; property IsDemo: WordBool index 59 read GetWordBoolProp; published property CurrentDeviceIndex: Integer index 4 read GetIntegerProp write SetIntegerProp stored False; property CurrentDeviceNumber: Integer index 5 read GetIntegerProp write SetIntegerProp stored False; property CurrentDeviceName: WideString index 6 read GetWideStringProp write SetWideStringProp stored False; property LockDevices: WordBool index 8 read GetWordBoolProp write SetWordBoolProp stored False; property PollingInterval: Integer index 10 read GetIntegerProp write SetIntegerProp stored False; property EventNumber: Integer index 11 read GetIntegerProp write SetIntegerProp stored False; property WeightStep: Double index 13 read GetDoubleProp write SetDoubleProp stored False; property Model: Integer index 14 read GetIntegerProp write SetIntegerProp stored False; property AsyncMode: WordBool index 15 read GetWordBoolProp write SetWordBoolProp stored False; property PortNumber: Integer index 16 read GetIntegerProp write SetIntegerProp stored False; property BaudRate: Integer index 17 read GetIntegerProp write SetIntegerProp stored False; property Parity: Integer index 18 read GetIntegerProp write SetIntegerProp stored False; property DeviceEnabled: WordBool index 19 read GetWordBoolProp write SetWordBoolProp stored False; property UnitPrice: Currency index 20 read GetCurrencyProp write SetCurrencyProp stored False; property TareWeight: Double index 23 read GetDoubleProp write SetDoubleProp stored False; property Value: Integer index 30 read GetIntegerProp write SetIntegerProp stored False; property ValuePurpose: Integer index 31 read GetIntegerProp write SetIntegerProp stored False; property UpdatePrice: WordBool index 41 read GetWordBoolProp write SetWordBoolProp stored False; property AutoDisable: WordBool index 43 read GetWordBoolProp write SetWordBoolProp stored False; property DataEventEnabled: WordBool index 44 read GetWordBoolProp write SetWordBoolProp stored False; property ApplicationHandle: Integer index 45 read GetIntegerProp write SetIntegerProp stored False; property LogicalNumber: Integer index 60 read GetIntegerProp write SetIntegerProp stored False; property OnDataEvent: TNotifyEvent read FOnDataEvent write FOnDataEvent; end; procedure Register; implementation uses ComObj; procedure TScale45.InitControlData; const CEventDispIDs: array [0..0] of DWORD = ( $00000001); CControlData: TControlData2 = ( ClassID: '{DCD43EE6-B38D-11D3-9DE1-0000E8DBEDCE}'; EventIID: '{DCD43EE7-B38D-11D3-9DE1-0000E8DBEDCE}'; EventCount: 1; EventDispIDs: @CEventDispIDs; LicenseKey: nil (*HR:$00000000*); Flags: $00000000; Version: 401); begin ControlData := @CControlData; TControlData2(CControlData).FirstEventOfs := Cardinal(@@FOnDataEvent) - Cardinal(Self); end; procedure TScale45.CreateControl; procedure DoCreate; begin FIntf := IUnknown(OleObject) as IScale1C; end; begin if FIntf = nil then DoCreate; end; function TScale45.GetControlInterface: IScale1C; begin CreateControl; Result := FIntf; end; function TScale45.ShowProperties: Integer; begin Result := DefaultInterface.ShowProperties; end; function TScale45.AddDevice: Integer; begin Result := DefaultInterface.AddDevice; end; function TScale45.DeleteDevice: Integer; begin Result := DefaultInterface.DeleteDevice; end; function TScale45.DeleteEvent: Integer; begin Result := DefaultInterface.DeleteEvent; end; function TScale45.ReadWeight: Integer; begin Result := DefaultInterface.ReadWeight; end; function TScale45.ZeroScale: Integer; begin Result := DefaultInterface.ZeroScale; end; function TScale45.Tare: Integer; begin Result := DefaultInterface.Tare; end; function TScale45.SetTareWeight: Integer; begin Result := DefaultInterface.SetTareWeight; end; function TScale45.GetDeviceMetrics: Integer; begin Result := DefaultInterface.GetDeviceMetrics; end; function TScale45.GetValue: Integer; begin Result := DefaultInterface.GetValue; end; function TScale45.SetValue: Integer; begin Result := DefaultInterface.SetValue; end; function TScale45.Reset: Integer; begin Result := DefaultInterface.Reset; end; function TScale45.GenerateAsyncMessage: Integer; begin Result := DefaultInterface.GenerateAsyncMessage; end; procedure TScale45.AboutBox; begin DefaultInterface.AboutBox; end; procedure Register; begin RegisterComponents('ActiveX',[TScale45]); end; end.