home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 2000 March / pcp161b.iso / full / delphi / RUNIMAGE / DELPHI30 / OCX / ISP / ISP3.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-08-03  |  143.3 KB  |  3,635 lines

  1. unit isp3;
  2.  
  3. { NetManage Internet Controls }
  4. { Version 1.0 }
  5.  
  6. interface
  7.  
  8. uses Windows, ActiveX, Classes, Graphics, OleCtrls, StdVCL;
  9.  
  10. const
  11.   LIBID_NMOCODObjects: TGUID = '{B7FC35A4-8CE7-11CF-9754-00AA00C00908}';
  12.  
  13. const
  14.  
  15. { DocStateConstants }
  16.  
  17.   icDocNone = 0;
  18.   icDocBegin = 1;
  19.   icDocHeaders = 2;
  20.   icDocData = 3;
  21.   icDocError = 4;
  22.   icDocEnd = 5;
  23.  
  24. const
  25.  
  26. { Component class GUIDs }
  27.   Class_DocHeaderCls: TGUID = '{B7FC3591-8CE7-11CF-9754-00AA00C00908}';
  28.   Class_DocHeadersCls: TGUID = '{B7FC3593-8CE7-11CF-9754-00AA00C00908}';
  29.   Class_DocInputCls: TGUID = '{B7FC3596-8CE7-11CF-9754-00AA00C00908}';
  30.   Class_DocOutputCls: TGUID = '{B7FC3598-8CE7-11CF-9754-00AA00C00908}';
  31.   Class_icErrorCls: TGUID = '{B7FC35A1-8CE7-11CF-9754-00AA00C00908}';
  32.   Class_icErrorsCls: TGUID = '{B7FC35A3-8CE7-11CF-9754-00AA00C00908}';
  33.  
  34. type
  35.  
  36. { Forward declarations }
  37. { Forward declarations: Interfaces }
  38.   DocHeader = interface;
  39.   DocHeaderDisp = dispinterface;
  40.   DocHeaders = interface;
  41.   DocHeadersDisp = dispinterface;
  42.   DocInput = interface;
  43.   DocInputDisp = dispinterface;
  44.   DocOutput = interface;
  45.   DocOutputDisp = dispinterface;
  46.   icError = interface;
  47.   icErrorDisp = dispinterface;
  48.   icErrors = interface;
  49.   icErrorsDisp = dispinterface;
  50.  
  51. { Forward declarations: CoClasses }
  52.   DocHeaderCls = DocHeader;
  53.   DocHeadersCls = DocHeaders;
  54.   DocInputCls = DocInput;
  55.   DocOutputCls = DocOutput;
  56.   icErrorCls = icError;
  57.   icErrorsCls = icErrors;
  58.  
  59. { Forward declarations: Enums }
  60.   DocStateConstants = TOleEnum;
  61.  
  62. { Internet DocHeader object properties and methods }
  63.  
  64.   DocHeader = interface(IDispatch)
  65.     ['{B7FC3590-8CE7-11CF-9754-00AA00C00908}']
  66.     function Get_Name: WideString; safecall;
  67.     procedure Set_Name(const Value: WideString); safecall;
  68.     function Get_Value: WideString; safecall;
  69.     procedure Set_Value(const Value: WideString); safecall;
  70.     procedure SetThisObject(var ThisObject: SYSINT); safecall;
  71.     property Name: WideString read Get_Name write Set_Name;
  72.     property Value: WideString read Get_Value write Set_Value;
  73.   end;
  74.  
  75. { DispInterface declaration for Dual Interface DocHeader }
  76.  
  77.   DocHeaderDisp = dispinterface
  78.     ['{B7FC3590-8CE7-11CF-9754-00AA00C00908}']
  79.     property Name: WideString dispid 0;
  80.     property Value: WideString dispid 2;
  81.     procedure SetThisObject(var ThisObject: SYSINT); dispid 3;
  82.   end;
  83.  
  84. { Internet DocHeaders collection properties and methods }
  85.  
  86.   DocHeaders = interface(IDispatch)
  87.     ['{B7FC3592-8CE7-11CF-9754-00AA00C00908}']
  88.     function Get_Count: Integer; safecall;
  89.     function Get_Text: WideString; safecall;
  90.     procedure Set_Text(const Value: WideString); safecall;
  91.     function Get__NewEnum: IUnknown; safecall;
  92.     function Item(Index: OleVariant): DocHeader; safecall;
  93.     function Add(const Name, Value: WideString): DocHeader; safecall;
  94.     procedure Remove(Index: OleVariant); safecall;
  95.     procedure Clear; safecall;
  96.     procedure SetThisObject(var ThisObject: SYSINT); safecall;
  97.     property Count: Integer read Get_Count;
  98.     property Text: WideString read Get_Text write Set_Text;
  99.     property _NewEnum: IUnknown read Get__NewEnum;
  100.   end;
  101.  
  102. { DispInterface declaration for Dual Interface DocHeaders }
  103.  
  104.   DocHeadersDisp = dispinterface
  105.     ['{B7FC3592-8CE7-11CF-9754-00AA00C00908}']
  106.     property Count: Integer readonly dispid 1;
  107.     property Text: WideString dispid 2;
  108.     property _NewEnum: IUnknown readonly dispid -4;
  109.     function Item(Index: OleVariant): DocHeader; dispid 0;
  110.     function Add(const Name, Value: WideString): DocHeader; dispid 4;
  111.     procedure Remove(Index: OleVariant); dispid 5;
  112.     procedure Clear; dispid 6;
  113.     procedure SetThisObject(var ThisObject: SYSINT); dispid 7;
  114.   end;
  115.  
  116. { Internet DocInput object properties and methods }
  117.  
  118.   DocInput = interface(IDispatch)
  119.     ['{B7FC3595-8CE7-11CF-9754-00AA00C00908}']
  120.     function Get_Headers: DocHeaders; safecall;
  121.     function Get_State: DocStateConstants; safecall;
  122.     function Get_BytesTotal: Integer; safecall;
  123.     function Get_BytesTransferred: Integer; safecall;
  124.     function Get_FileName: WideString; safecall;
  125.     procedure Set_FileName(const Value: WideString); safecall;
  126.     function Get_DocLink: IUnknown; safecall;
  127.     procedure Set_DocLink(Value: IUnknown); safecall;
  128.     function Get_Suspended: WordBool; safecall;
  129.     function Get_PushStreamMode: WordBool; safecall;
  130.     procedure Set_PushStreamMode(Value: WordBool); safecall;
  131.     procedure GetData(out Data: OleVariant; Type_: OleVariant); safecall;
  132.     procedure SetData(Data: OleVariant); safecall;
  133.     procedure Suspend(Suspend: WordBool); safecall;
  134.     function Get_CPPObject: SYSINT; safecall;
  135.     procedure Set_CPPObject(Value: SYSINT); safecall;
  136.     procedure PushStream; safecall;
  137.     function Get_Tag: OleVariant; safecall;
  138.     procedure Set_Tag(Value: OleVariant); safecall;
  139.     function Get_Errors: icErrors; safecall;
  140.     function Get_URL: WideString; safecall;
  141.     property Headers: DocHeaders read Get_Headers;
  142.     property State: DocStateConstants read Get_State;
  143.     property BytesTotal: Integer read Get_BytesTotal;
  144.     property BytesTransferred: Integer read Get_BytesTransferred;
  145.     property FileName: WideString read Get_FileName write Set_FileName;
  146.     property DocLink: IUnknown read Get_DocLink write Set_DocLink;
  147.     property Suspended: WordBool read Get_Suspended;
  148.     property PushStreamMode: WordBool read Get_PushStreamMode write Set_PushStreamMode;
  149.     property CPPObject: SYSINT read Get_CPPObject write Set_CPPObject;
  150.     property Tag: OleVariant read Get_Tag write Set_Tag;
  151.     property Errors: icErrors read Get_Errors;
  152.     property URL: WideString read Get_URL;
  153.   end;
  154.  
  155. { DispInterface declaration for Dual Interface DocInput }
  156.  
  157.   DocInputDisp = dispinterface
  158.     ['{B7FC3595-8CE7-11CF-9754-00AA00C00908}']
  159.     property Headers: DocHeaders readonly dispid 2;
  160.     property State: DocStateConstants readonly dispid 3;
  161.     property BytesTotal: Integer readonly dispid 4;
  162.     property BytesTransferred: Integer readonly dispid 5;
  163.     property FileName: WideString dispid 6;
  164.     property DocLink: IUnknown dispid 7;
  165.     property Suspended: WordBool readonly dispid 11;
  166.     property PushStreamMode: WordBool dispid 12;
  167.     procedure GetData(out Data: OleVariant; Type_: OleVariant); dispid 9;
  168.     procedure SetData(Data: OleVariant); dispid 8;
  169.     procedure Suspend(Suspend: WordBool); dispid 10;
  170.     property CPPObject: SYSINT dispid 14;
  171.     procedure PushStream; dispid 13;
  172.     property Tag: OleVariant dispid 16;
  173.     property Errors: icErrors readonly dispid 17;
  174.     property URL: WideString readonly dispid 1;
  175.   end;
  176.  
  177. { Internet DocOutput object properties and methods }
  178.  
  179.   DocOutput = interface(IDispatch)
  180.     ['{B7FC3597-8CE7-11CF-9754-00AA00C00908}']
  181.     function Get_Headers: DocHeaders; safecall;
  182.     function Get_State: DocStateConstants; safecall;
  183.     function Get_BytesTotal: Integer; safecall;
  184.     function Get_BytesTransferred: Integer; safecall;
  185.     function Get_FileName: WideString; safecall;
  186.     procedure Set_FileName(const Value: WideString); safecall;
  187.     function Get_DocLink: IUnknown; safecall;
  188.     function Get_Suspended: WordBool; safecall;
  189.     function Get_PushStreamMode: WordBool; safecall;
  190.     function Get_DataString: WideString; safecall;
  191.     function Get_DataBlock: OleVariant; safecall;
  192.     procedure GetData(out Data: OleVariant; Type_: OleVariant); safecall;
  193.     procedure SetData(Data: OleVariant); safecall;
  194.     procedure Suspend(Suspend: WordBool); safecall;
  195.     function Get_CPPObject: SYSINT; safecall;
  196.     procedure Set_CPPObject(Value: SYSINT); safecall;
  197.     function Get_AppendToFile: WordBool; safecall;
  198.     procedure Set_AppendToFile(Value: WordBool); safecall;
  199.     function Get_Tag: OleVariant; safecall;
  200.     procedure Set_Tag(Value: OleVariant); safecall;
  201.     function Get_Errors: icErrors; safecall;
  202.     function Get_URL: WideString; safecall;
  203.     property Headers: DocHeaders read Get_Headers;
  204.     property State: DocStateConstants read Get_State;
  205.     property BytesTotal: Integer read Get_BytesTotal;
  206.     property BytesTransferred: Integer read Get_BytesTransferred;
  207.     property FileName: WideString read Get_FileName write Set_FileName;
  208.     property DocLink: IUnknown read Get_DocLink;
  209.     property Suspended: WordBool read Get_Suspended;
  210.     property PushStreamMode: WordBool read Get_PushStreamMode;
  211.     property DataString: WideString read Get_DataString;
  212.     property DataBlock: OleVariant read Get_DataBlock;
  213.     property CPPObject: SYSINT read Get_CPPObject write Set_CPPObject;
  214.     property AppendToFile: WordBool read Get_AppendToFile write Set_AppendToFile;
  215.     property Tag: OleVariant read Get_Tag write Set_Tag;
  216.     property Errors: icErrors read Get_Errors;
  217.     property URL: WideString read Get_URL;
  218.   end;
  219.  
  220. { DispInterface declaration for Dual Interface DocOutput }
  221.  
  222.   DocOutputDisp = dispinterface
  223.     ['{B7FC3597-8CE7-11CF-9754-00AA00C00908}']
  224.     property Headers: DocHeaders readonly dispid 2;
  225.     property State: DocStateConstants readonly dispid 3;
  226.     property BytesTotal: Integer readonly dispid 4;
  227.     property BytesTransferred: Integer readonly dispid 5;
  228.     property FileName: WideString dispid 6;
  229.     property DocLink: IUnknown readonly dispid 7;
  230.     property Suspended: WordBool readonly dispid 11;
  231.     property PushStreamMode: WordBool readonly dispid 12;
  232.     property DataString: WideString readonly dispid 19;
  233.     property DataBlock: OleVariant readonly dispid 18;
  234.     procedure GetData(out Data: OleVariant; Type_: OleVariant); dispid 9;
  235.     procedure SetData(Data: OleVariant); dispid 8;
  236.     procedure Suspend(Suspend: WordBool); dispid 10;
  237.     property CPPObject: SYSINT dispid 14;
  238.     property AppendToFile: WordBool dispid 15;
  239.     property Tag: OleVariant dispid 16;
  240.     property Errors: icErrors readonly dispid 17;
  241.     property URL: WideString readonly dispid 1;
  242.   end;
  243.  
  244. { Internet error object properties and methods }
  245.  
  246.   icError = interface(IDispatch)
  247.     ['{B7FC35A0-8CE7-11CF-9754-00AA00C00908}']
  248.     function Get_Type_: WideString; safecall;
  249.     function Get_Code: Integer; safecall;
  250.     function Get_Description: WideString; safecall;
  251.     procedure SetThisObject(var ThisObject: SYSINT); safecall;
  252.     procedure InitProperties(var ErrorType, ErrorDesc: WideString; var ErrorCode: Integer); safecall;
  253.     property Type_: WideString read Get_Type_;
  254.     property Code: Integer read Get_Code;
  255.     property Description: WideString read Get_Description;
  256.   end;
  257.  
  258. { DispInterface declaration for Dual Interface icError }
  259.  
  260.   icErrorDisp = dispinterface
  261.     ['{B7FC35A0-8CE7-11CF-9754-00AA00C00908}']
  262.     property Type_: WideString readonly dispid 0;
  263.     property Code: Integer readonly dispid 151;
  264.     property Description: WideString readonly dispid 152;
  265.     procedure SetThisObject(var ThisObject: SYSINT); dispid 154;
  266.     procedure InitProperties(var ErrorType, ErrorDesc: WideString; var ErrorCode: Integer); dispid 155;
  267.   end;
  268.  
  269. { Internet errors collection properties and methods }
  270.  
  271.   icErrors = interface(IDispatch)
  272.     ['{B7FC35A2-8CE7-11CF-9754-00AA00C00908}']
  273.     function Get_Count: Integer; safecall;
  274.     function Get_Source: OleVariant; safecall;
  275.     function Get__NewEnum: IUnknown; safecall;
  276.     function Item(Index: OleVariant): icError; safecall;
  277.     procedure Clear; safecall;
  278.     procedure SetItem(var ErrCode: Integer; var ErrType, ErrDesc: WideString); safecall;
  279.     procedure SetThisObject(var ThisObject: SYSINT); safecall;
  280.     procedure SetCollection(var initString: WideString); safecall;
  281.     property Count: Integer read Get_Count;
  282.     property Source: OleVariant read Get_Source;
  283.     property _NewEnum: IUnknown read Get__NewEnum;
  284.   end;
  285.  
  286. { DispInterface declaration for Dual Interface icErrors }
  287.  
  288.   icErrorsDisp = dispinterface
  289.     ['{B7FC35A2-8CE7-11CF-9754-00AA00C00908}']
  290.     property Count: Integer readonly dispid 100;
  291.     property Source: OleVariant readonly dispid 102;
  292.     property _NewEnum: IUnknown readonly dispid -4;
  293.     function Item(Index: OleVariant): icError; dispid 0;
  294.     procedure Clear; dispid 103;
  295.     procedure SetItem(var ErrCode: Integer; var ErrType, ErrDesc: WideString); dispid 153;
  296.     procedure SetThisObject(var ThisObject: SYSINT); dispid 104;
  297.     procedure SetCollection(var initString: WideString); dispid 105;
  298.   end;
  299.  
  300. { Internet DocHeader object }
  301.  
  302.   CoDocHeaderCls = class
  303.     class function Create: DocHeader;
  304.     class function CreateRemote(const MachineName: string): DocHeader;
  305.   end;
  306.  
  307. { Internet DocHeaders object }
  308.  
  309.   CoDocHeadersCls = class
  310.     class function Create: DocHeaders;
  311.     class function CreateRemote(const MachineName: string): DocHeaders;
  312.   end;
  313.  
  314. { Internet DocInput object }
  315.  
  316.   CoDocInputCls = class
  317.     class function Create: DocInput;
  318.     class function CreateRemote(const MachineName: string): DocInput;
  319.   end;
  320.  
  321. { Internet DocOutput object }
  322.  
  323.   CoDocOutputCls = class
  324.     class function Create: DocOutput;
  325.     class function CreateRemote(const MachineName: string): DocOutput;
  326.   end;
  327.  
  328. { Internet error object }
  329.  
  330.   CoicErrorCls = class
  331.     class function Create: icError;
  332.     class function CreateRemote(const MachineName: string): icError;
  333.   end;
  334.  
  335. { Internet errors collection }
  336.  
  337.   CoicErrorsCls = class
  338.     class function Create: icErrors;
  339.     class function CreateRemote(const MachineName: string): icErrors;
  340.   end;
  341.  
  342. const
  343.   LIBID_FTPCTLib: TGUID = '{B7FC3542-8CE7-11CF-9754-00AA00C00908}';
  344.  
  345. const
  346.  
  347. { FTPFirewallModeConstants }
  348.  
  349.   ftpFirewallOff = 0;
  350.   ftpFirewallSite = 1;
  351.   ftpFirewallOpen = 2;
  352.   ftpFirewallUserLogin = 3;
  353.   ftpFirewallUserNoLogin = 4;
  354.   ftpFirewallManual = 5;
  355.  
  356. { FTPFirewallStateConstants }
  357.  
  358.   ftpFirewallBase = 1300;
  359.   ftpFirewallConnected = 1301;
  360.   ftpFirewallConnected_Msg = 1302;
  361.   ftpFirewallUser_OK = 1303;
  362.   ftpFirewallAuthorized = 1304;
  363.   ftpFirewallRemoteConnected = 1305;
  364.   ftpFirewallDisconnecting = 1306;
  365.  
  366. { NotificationModeConstants }
  367.  
  368.   icCompleteMode = 0;
  369.   icContinousMode = 1;
  370.  
  371. { BlockResultConstants }
  372.  
  373.   icBlockOK = 0;
  374.   icTimedOut = 1;
  375.   icErrorExit = 2;
  376.   icBlockCancel = 3;
  377.   icUserQuit = 4;
  378.  
  379. { StateConstants }
  380.  
  381.   prcConnecting = 1;
  382.   prcResolvingHost = 2;
  383.   prcHostResolved = 3;
  384.   prcConnected = 4;
  385.   prcDisconnecting = 5;
  386.   prcDisconnected = 6;
  387.  
  388. { TimeoutConstants }
  389.  
  390.   prcConnectTimeout = 1;
  391.   prcReceiveTimeout = 2;
  392.   prcUserTimeout = 65;
  393.  
  394. { FTPTypeConstants }
  395.  
  396.   ftpAscii = 0;
  397.   ftpEBCDIC = 1;
  398.   ftpImage = 2;
  399.   ftpBinary = 3;
  400.  
  401. { FTPModeConstants }
  402.  
  403.   ftpStream = 0;
  404.   ftpBlock = 1;
  405.   ftpCompressed = 2;
  406.  
  407. { FTPOperationConstants }
  408.  
  409.   ftpFile = 0;
  410.   ftpList = 1;
  411.   ftpNameList = 2;
  412.  
  413. { FTPProtocolStateConstants }
  414.  
  415.   ftpBase = 0;
  416.   ftpAuthentication = 1;
  417.   ftpTransaction = 2;
  418.  
  419. const
  420.  
  421. { Component class GUIDs }
  422.   Class_FTPDirItemCls: TGUID = '{B7FC3544-8CE7-11CF-9754-00AA00C00908}';
  423.   Class_Firewall: TGUID = '{71A0C640-E157-11CF-A306-00A0243B6C29}';
  424.   Class_FTP: TGUID = '{B7FC354C-8CE7-11CF-9754-00AA00C00908}';
  425.  
  426. type
  427.  
  428. { Forward declarations }
  429. { Forward declarations: Interfaces }
  430.   FTPDirItem = interface;
  431.   FTPDirItemDisp = dispinterface;
  432.   IFirewall = interface;
  433.   IFirewallDisp = dispinterface;
  434.   INMOleControl = interface;
  435.   INMOleControlDisp = dispinterface;
  436.   DNMOleControlEvents = dispinterface;
  437.   INMOleClientControl = interface;
  438.   INMOleClientControlDisp = dispinterface;
  439.   DNMOleClientControlEvents = dispinterface;
  440.   INMOleAuthClientControl = interface;
  441.   INMOleAuthClientControlDisp = dispinterface;
  442.   DNMOleAuthClientControlEvents = dispinterface;
  443.   Iftpct = interface;
  444.   IftpctDisp = dispinterface;
  445.   DftpctEvents = dispinterface;
  446.  
  447. { Forward declarations: CoClasses }
  448.   FTPDirItemCls = FTPDirItem;
  449.   Firewall = IFirewall;
  450.   FTP = Iftpct;
  451.  
  452. { Forward declarations: Enums }
  453.   FTPFirewallModeConstants = TOleEnum;
  454.   FTPFirewallStateConstants = TOleEnum;
  455.   NotificationModeConstants = TOleEnum;
  456.   BlockResultConstants = TOleEnum;
  457.   StateConstants = TOleEnum;
  458.   TimeoutConstants = TOleEnum;
  459.   FTPTypeConstants = TOleEnum;
  460.   FTPModeConstants = TOleEnum;
  461.   FTPOperationConstants = TOleEnum;
  462.   FTPProtocolStateConstants = TOleEnum;
  463.  
  464. { FTP directory item properties and methods }
  465.  
  466.   FTPDirItem = interface(IDispatch)
  467.     ['{B7FC3543-8CE7-11CF-9754-00AA00C00908}']
  468.     function Get_Date: WideString; safecall;
  469.     function Get_Size: Integer; safecall;
  470.     function Get_Attributes: SYSINT; safecall;
  471.     function Get_Detail: WideString; safecall;
  472.     function Get_FileName: WideString; safecall;
  473.     property Date: WideString read Get_Date;
  474.     property Size: Integer read Get_Size;
  475.     property Attributes: SYSINT read Get_Attributes;
  476.     property Detail: WideString read Get_Detail;
  477.     property FileName: WideString read Get_FileName;
  478.   end;
  479.  
  480. { DispInterface declaration for Dual Interface FTPDirItem }
  481.  
  482.   FTPDirItemDisp = dispinterface
  483.     ['{B7FC3543-8CE7-11CF-9754-00AA00C00908}']
  484.     property Date: WideString readonly dispid 70;
  485.     property Size: Integer readonly dispid 71;
  486.     property Attributes: SYSINT readonly dispid 72;
  487.     property Detail: WideString readonly dispid 73;
  488.     property FileName: WideString readonly dispid 74;
  489.   end;
  490.  
  491. { FirewallObject }
  492.  
  493.   IFirewall = interface(IDispatch)
  494.     ['{7061DDA0-E157-11CF-A306-00A0243B6C29}']
  495.     function Get_Mode: Smallint; safecall;
  496.     procedure Set_Mode(Value: Smallint); safecall;
  497.     function Get_State: Smallint; safecall;
  498.     function Get_StateString: WideString; safecall;
  499.     function Get_Host: WideString; safecall;
  500.     procedure Set_Host(const Value: WideString); safecall;
  501.     function Get_Port: Integer; safecall;
  502.     procedure Set_Port(Value: Integer); safecall;
  503.     function Get_UserId: WideString; safecall;
  504.     procedure Set_UserId(const Value: WideString); safecall;
  505.     function Get_Password: WideString; safecall;
  506.     procedure Set_Password(const Value: WideString); safecall;
  507.     property Mode: Smallint read Get_Mode write Set_Mode;
  508.     property State: Smallint read Get_State;
  509.     property StateString: WideString read Get_StateString;
  510.     property Host: WideString read Get_Host write Set_Host;
  511.     property Port: Integer read Get_Port write Set_Port;
  512.     property UserId: WideString read Get_UserId write Set_UserId;
  513.     property Password: WideString read Get_Password write Set_Password;
  514.   end;
  515.  
  516. { DispInterface declaration for Dual Interface IFirewall }
  517.  
  518.   IFirewallDisp = dispinterface
  519.     ['{7061DDA0-E157-11CF-A306-00A0243B6C29}']
  520.     property Mode: Smallint dispid 80;
  521.     property State: Smallint readonly dispid 81;
  522.     property StateString: WideString readonly dispid 92;
  523.     property Host: WideString dispid 82;
  524.     property Port: Integer dispid 83;
  525.     property UserId: WideString dispid 84;
  526.     property Password: WideString dispid 85;
  527.   end;
  528.  
  529. { NetManage Internet Control }
  530.  
  531.   INMOleControl = interface(IDispatch)
  532.     ['{B7FC35B6-8CE7-11CF-9754-00AA00C00908}']
  533.     function Get_Blocking: WordBool; safecall;
  534.     procedure Set_Blocking(Value: WordBool); safecall;
  535.     function Get_SleepTime: Integer; safecall;
  536.     procedure Set_SleepTime(Value: Integer); safecall;
  537.     function Get_BlockResult: Smallint; safecall;
  538.     procedure AboutBox; safecall;
  539.     property Blocking: WordBool read Get_Blocking write Set_Blocking;
  540.     property SleepTime: Integer read Get_SleepTime write Set_SleepTime;
  541.     property BlockResult: Smallint read Get_BlockResult;
  542.   end;
  543.  
  544. { DispInterface declaration for Dual Interface INMOleControl }
  545.  
  546.   INMOleControlDisp = dispinterface
  547.     ['{B7FC35B6-8CE7-11CF-9754-00AA00C00908}']
  548.     property Blocking: WordBool dispid 515;
  549.     property SleepTime: Integer dispid 516;
  550.     property BlockResult: Smallint readonly dispid 519;
  551.     procedure AboutBox; dispid -552;
  552.   end;
  553.  
  554. { NetManage Internet Control events }
  555.  
  556.   DNMOleControlEvents = dispinterface
  557.     ['{B7FC35B7-8CE7-11CF-9754-00AA00C00908}']
  558.     procedure Error(Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool); dispid -608;
  559.   end;
  560.  
  561. { NetManage internet client control }
  562.  
  563.   INMOleClientControl = interface(INMOleControl)
  564.     ['{B7FC35B4-8CE7-11CF-9754-00AA00C00908}']
  565.     function Get_RemoteHost: WideString; safecall;
  566.     procedure Set_RemoteHost(const Value: WideString); safecall;
  567.     function Get_RemotePort: Integer; safecall;
  568.     procedure Set_RemotePort(Value: Integer); safecall;
  569.     function Get_State: Smallint; safecall;
  570.     function Get_ProtocolState: Smallint; safecall;
  571.     function Get_ReplyString: WideString; safecall;
  572.     function Get_ReplyCode: Integer; safecall;
  573.     function Get_Timeout(event: Smallint): Integer; safecall;
  574.     procedure Set_Timeout(event: Smallint; Value: Integer); safecall;
  575.     procedure Set_EnableTimer(event: Smallint; Value: WordBool); safecall;
  576.     function Get_Errors: icErrors; safecall;
  577.     function Get_Busy: WordBool; safecall;
  578.     function Get_NotificationMode: Smallint; safecall;
  579.     procedure Set_NotificationMode(Value: Smallint); safecall;
  580.     function Get_StateString: WideString; safecall;
  581.     function Get_ProtocolStateString: WideString; safecall;
  582.     function Get_Logging: WordBool; safecall;
  583.     procedure Set_Logging(Value: WordBool); safecall;
  584.     function Get_LocalPort: Integer; safecall;
  585.     procedure Set_LocalPort(Value: Integer); safecall;
  586.     function Get_SocketHandle: Integer; safecall;
  587.     procedure Cancel; safecall;
  588.     procedure Connect(RemoteHost, RemotePort: OleVariant); safecall;
  589.     property RemoteHost: WideString read Get_RemoteHost write Set_RemoteHost;
  590.     property RemotePort: Integer read Get_RemotePort write Set_RemotePort;
  591.     property State: Smallint read Get_State;
  592.     property ProtocolState: Smallint read Get_ProtocolState;
  593.     property ReplyString: WideString read Get_ReplyString;
  594.     property ReplyCode: Integer read Get_ReplyCode;
  595.     property Timeout[event: Smallint]: Integer read Get_Timeout write Set_Timeout;
  596.     property EnableTimer[event: Smallint]: WordBool write Set_EnableTimer;
  597.     property Errors: icErrors read Get_Errors;
  598.     property Busy: WordBool read Get_Busy;
  599.     property NotificationMode: Smallint read Get_NotificationMode write Set_NotificationMode;
  600.     property StateString: WideString read Get_StateString;
  601.     property ProtocolStateString: WideString read Get_ProtocolStateString;
  602.     property Logging: WordBool read Get_Logging write Set_Logging;
  603.     property LocalPort: Integer read Get_LocalPort write Set_LocalPort;
  604.     property SocketHandle: Integer read Get_SocketHandle;
  605.   end;
  606.  
  607. { DispInterface declaration for Dual Interface INMOleClientControl }
  608.  
  609.   INMOleClientControlDisp = dispinterface
  610.     ['{B7FC35B4-8CE7-11CF-9754-00AA00C00908}']
  611.     property RemoteHost: WideString dispid 0;
  612.     property RemotePort: Integer dispid 502;
  613.     property State: Smallint readonly dispid 503;
  614.     property ProtocolState: Smallint readonly dispid 504;
  615.     property ReplyString: WideString readonly dispid 505;
  616.     property ReplyCode: Integer readonly dispid 506;
  617.     property Timeout[event: Smallint]: Integer dispid 507;
  618.     property EnableTimer[event: Smallint]: WordBool writeonly dispid 513;
  619.     property Errors: icErrors readonly dispid 508;
  620.     property Busy: WordBool readonly dispid 509;
  621.     property NotificationMode: Smallint dispid 510;
  622.     property StateString: WideString readonly dispid 511;
  623.     property ProtocolStateString: WideString readonly dispid 512;
  624.     property Logging: WordBool dispid 514;
  625.     property LocalPort: Integer dispid 517;
  626.     property SocketHandle: Integer readonly dispid 518;
  627.     procedure Cancel; dispid 520;
  628.     procedure Connect(RemoteHost, RemotePort: OleVariant); dispid 521;
  629.   end;
  630.  
  631. { NetManage Internet Client control events }
  632.  
  633.   DNMOleClientControlEvents = dispinterface
  634.     ['{B7FC35B5-8CE7-11CF-9754-00AA00C00908}']
  635.     procedure Timeout(event: Smallint); dispid 551;
  636.     procedure Cancel; dispid 552;
  637.     procedure StateChanged(State: Smallint); dispid 553;
  638.     procedure ProtocolStateChanged(ProtocolState: Smallint); dispid 554;
  639.     procedure Busy(isBusy: WordBool); dispid 555;
  640.     procedure Log; dispid 556;
  641.   end;
  642.  
  643. { NetManage Authenticated Client Control }
  644.  
  645.   INMOleAuthClientControl = interface(INMOleClientControl)
  646.     ['{B7FC35B0-8CE7-11CF-9754-00AA00C00908}']
  647.     function Get_UserId: WideString; safecall;
  648.     procedure Set_UserId(const Value: WideString); safecall;
  649.     function Get_Password: WideString; safecall;
  650.     procedure Set_Password(const Value: WideString); safecall;
  651.     procedure Authenticate(UserId, Password: OleVariant); safecall;
  652.     property UserId: WideString read Get_UserId write Set_UserId;
  653.     property Password: WideString read Get_Password write Set_Password;
  654.   end;
  655.  
  656. { DispInterface declaration for Dual Interface INMOleAuthClientControl }
  657.  
  658.   INMOleAuthClientControlDisp = dispinterface
  659.     ['{B7FC35B0-8CE7-11CF-9754-00AA00C00908}']
  660.     property UserId: WideString dispid 601;
  661.     property Password: WideString dispid 602;
  662.     procedure Authenticate(UserId, Password: OleVariant); dispid 610;
  663.   end;
  664.  
  665. { Event interface for NetManage Authenticated Client Control }
  666.  
  667.   DNMOleAuthClientControlEvents = dispinterface
  668.     ['{B7FC35B1-8CE7-11CF-9754-00AA00C00908}']
  669.   end;
  670.  
  671. { Properties/Methods for NetManage FTP Client Control }
  672.  
  673.   Iftpct = interface(INMOleAuthClientControl)
  674.     ['{B7FC354A-8CE7-11CF-9754-00AA00C00908}']
  675.     function Get_URL: WideString; safecall;
  676.     procedure Set_URL(const Value: WideString); safecall;
  677.     function Get_DocInput: DocInput; safecall;
  678.     function Get_DocOutput: DocOutput; safecall;
  679.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant); safecall;
  680.     procedure GetDoc(URL, Headers, OutputFile: OleVariant); safecall;
  681.     function Get_AppendToFile: WordBool; safecall;
  682.     procedure Set_AppendToFile(Value: WordBool); safecall;
  683.     function Get_ListItemNotify: WordBool; safecall;
  684.     procedure Set_ListItemNotify(Value: WordBool); safecall;
  685.     function Get_RemoteFile: WideString; safecall;
  686.     procedure Set_RemoteFile(const Value: WideString); safecall;
  687.     function Get_Operation: FTPOperationConstants; safecall;
  688.     function Get_PassiveMode: WordBool; safecall;
  689.     procedure Set_PassiveMode(Value: WordBool); safecall;
  690.     function Get_Firewall: IFirewall; safecall;
  691.     procedure Abort; safecall;
  692.     procedure Account(const Account: WideString); safecall;
  693.     procedure ChangeDir(const directory: WideString); safecall;
  694.     procedure CreateDir(const directory: WideString); safecall;
  695.     procedure DeleteDir(const directory: WideString); safecall;
  696.     procedure DeleteFile(const FileName: WideString); safecall;
  697.     procedure Quit; safecall;
  698.     procedure Help(const Help: WideString); safecall;
  699.     procedure Noop; safecall;
  700.     procedure Mode(ftpMode: FTPModeConstants); safecall;
  701.     procedure Type_(ftpType: FTPTypeConstants); safecall;
  702.     procedure List(const List: WideString); safecall;
  703.     procedure NameList(const NameList: WideString); safecall;
  704.     procedure ParentDir; safecall;
  705.     procedure PrintDir; safecall;
  706.     procedure Execute(const Execute: WideString); safecall;
  707.     procedure Status(const Status: WideString); safecall;
  708.     procedure PutFile(const srcFileName, destFileName: WideString); safecall;
  709.     procedure Reinitialize; safecall;
  710.     procedure System; safecall;
  711.     procedure GetFile(const srcFileName, destFileName: WideString); safecall;
  712.     procedure PutFileUnique(const FileName: WideString); safecall;
  713.     procedure Site(const Site: WideString); safecall;
  714.     property URL: WideString read Get_URL write Set_URL;
  715.     property DocInput: DocInput read Get_DocInput;
  716.     property DocOutput: DocOutput read Get_DocOutput;
  717.     property AppendToFile: WordBool read Get_AppendToFile write Set_AppendToFile;
  718.     property ListItemNotify: WordBool read Get_ListItemNotify write Set_ListItemNotify;
  719.     property RemoteFile: WideString read Get_RemoteFile write Set_RemoteFile;
  720.     property Operation: FTPOperationConstants read Get_Operation;
  721.     property PassiveMode: WordBool read Get_PassiveMode write Set_PassiveMode;
  722.     property Firewall: IFirewall read Get_Firewall;
  723.   end;
  724.  
  725. { DispInterface declaration for Dual Interface Iftpct }
  726.  
  727.   IftpctDisp = dispinterface
  728.     ['{B7FC354A-8CE7-11CF-9754-00AA00C00908}']
  729.     property URL: WideString dispid 1001;
  730.     property DocInput: DocInput readonly dispid 1002;
  731.     property DocOutput: DocOutput readonly dispid 1003;
  732.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant); dispid 1005;
  733.     procedure GetDoc(URL, Headers, OutputFile: OleVariant); dispid 1004;
  734.     property AppendToFile: WordBool dispid 1;
  735.     property ListItemNotify: WordBool dispid 2;
  736.     property RemoteFile: WideString dispid 3;
  737.     property Operation: FTPOperationConstants readonly dispid 5;
  738.     property PassiveMode: WordBool dispid 6;
  739.     property Firewall: IFirewall readonly dispid 86;
  740.     procedure Abort; dispid 8;
  741.     procedure Account(const Account: WideString); dispid 9;
  742.     procedure ChangeDir(const directory: WideString); dispid 10;
  743.     procedure CreateDir(const directory: WideString); dispid 11;
  744.     procedure DeleteDir(const directory: WideString); dispid 12;
  745.     procedure DeleteFile(const FileName: WideString); dispid 13;
  746.     procedure Quit; dispid 14;
  747.     procedure Help(const Help: WideString); dispid 16;
  748.     procedure Noop; dispid 18;
  749.     procedure Mode(ftpMode: FTPModeConstants); dispid 19;
  750.     procedure Type_(ftpType: FTPTypeConstants); dispid 20;
  751.     procedure List(const List: WideString); dispid 21;
  752.     procedure NameList(const NameList: WideString); dispid 22;
  753.     procedure ParentDir; dispid 23;
  754.     procedure PrintDir; dispid 24;
  755.     procedure Execute(const Execute: WideString); dispid 25;
  756.     procedure Status(const Status: WideString); dispid 26;
  757.     procedure PutFile(const srcFileName, destFileName: WideString); dispid 27;
  758.     procedure Reinitialize; dispid 28;
  759.     procedure System; dispid 29;
  760.     procedure GetFile(const srcFileName, destFileName: WideString); dispid 30;
  761.     procedure PutFileUnique(const FileName: WideString); dispid 31;
  762.     procedure Site(const Site: WideString); dispid 32;
  763.   end;
  764.  
  765. { FTP client control events }
  766.  
  767.   DftpctEvents = dispinterface
  768.     ['{B7FC354B-8CE7-11CF-9754-00AA00C00908}']
  769.     procedure Error(Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool); dispid -608;
  770.     procedure Timeout(event: Smallint; var Continue: WordBool); dispid 551;
  771.     procedure Cancel; dispid 552;
  772.     procedure StateChanged(State: Smallint); dispid 553;
  773.     procedure ProtocolStateChanged(ProtocolState: Smallint); dispid 554;
  774.     procedure Busy(isBusy: WordBool); dispid 555;
  775.     procedure Log; dispid 556;
  776.     procedure DocInput(const DocInput: DocInput); dispid 1016;
  777.     procedure DocOutput(const DocOutput: DocOutput); dispid 1017;
  778.     procedure Abort; dispid 43;
  779.     procedure Account; dispid 44;
  780.     procedure ChangeDir; dispid 45;
  781.     procedure CreateDir; dispid 47;
  782.     procedure DeleteDir; dispid 48;
  783.     procedure DelFile; dispid 49;
  784.     procedure Help; dispid 54;
  785.     procedure Mode; dispid 55;
  786.     procedure Noop; dispid 56;
  787.     procedure ParentDir; dispid 57;
  788.     procedure PrintDir; dispid 58;
  789.     procedure Execute; dispid 60;
  790.     procedure Status; dispid 62;
  791.     procedure Reinitialize; dispid 63;
  792.     procedure System; dispid 64;
  793.     procedure Site; dispid 66;
  794.     procedure Type_; dispid 68;
  795.     procedure ListItem(const Item: FTPDirItem); dispid 67;
  796.     procedure FirewallStateChanged(sFirewallState: Smallint); dispid 90;
  797.   end;
  798.  
  799. { FTP directory item object }
  800.  
  801.   CoFTPDirItemCls = class
  802.     class function Create: FTPDirItem;
  803.     class function CreateRemote(const MachineName: string): FTPDirItem;
  804.   end;
  805.  
  806. { Firewall Object }
  807.  
  808.   CoFirewall = class
  809.     class function Create: IFirewall;
  810.     class function CreateRemote(const MachineName: string): IFirewall;
  811.   end;
  812.  
  813. { NetManage FTP Client Control }
  814.  
  815.   TFTPError = procedure(Sender: TObject; Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool) of object;
  816.   TFTPTimeout = procedure(Sender: TObject; event: Smallint; var Continue: WordBool) of object;
  817.   TFTPStateChanged = procedure(Sender: TObject; State: Smallint) of object;
  818.   TFTPProtocolStateChanged = procedure(Sender: TObject; ProtocolState: Smallint) of object;
  819.   TFTPBusy = procedure(Sender: TObject; isBusy: WordBool) of object;
  820.   TFTPDocInput = procedure(Sender: TObject; const DocInput: DocInput) of object;
  821.   TFTPDocOutput = procedure(Sender: TObject; const DocOutput: DocOutput) of object;
  822.   TFTPListItem = procedure(Sender: TObject; const Item: FTPDirItem) of object;
  823.   TFTPFirewallStateChanged = procedure(Sender: TObject; sFirewallState: Smallint) of object;
  824.  
  825.   TFTP = class(TOleControl)
  826.   private
  827.     FOnError: TFTPError;
  828.     FOnTimeout: TFTPTimeout;
  829.     FOnCancel: TNotifyEvent;
  830.     FOnStateChanged: TFTPStateChanged;
  831.     FOnProtocolStateChanged: TFTPProtocolStateChanged;
  832.     FOnBusy: TFTPBusy;
  833.     FOnLog: TNotifyEvent;
  834.     FOnDocInput: TFTPDocInput;
  835.     FOnDocOutput: TFTPDocOutput;
  836.     FOnAbort: TNotifyEvent;
  837.     FOnAccount: TNotifyEvent;
  838.     FOnChangeDir: TNotifyEvent;
  839.     FOnCreateDir: TNotifyEvent;
  840.     FOnDeleteDir: TNotifyEvent;
  841.     FOnDelFile: TNotifyEvent;
  842.     FOnHelp: TNotifyEvent;
  843.     FOnMode: TNotifyEvent;
  844.     FOnNoop: TNotifyEvent;
  845.     FOnParentDir: TNotifyEvent;
  846.     FOnPrintDir: TNotifyEvent;
  847.     FOnExecute: TNotifyEvent;
  848.     FOnStatus: TNotifyEvent;
  849.     FOnReinitialize: TNotifyEvent;
  850.     FOnSystem: TNotifyEvent;
  851.     FOnSite: TNotifyEvent;
  852.     FOnType_: TNotifyEvent;
  853.     FOnListItem: TFTPListItem;
  854.     FOnFirewallStateChanged: TFTPFirewallStateChanged;
  855.     FIntf: Iftpct;
  856.     function Get_Timeout(event: Smallint): Integer;
  857.     procedure Set_Timeout(event: Smallint; Value: Integer);
  858.     procedure Set_EnableTimer(event: Smallint; Value: WordBool);
  859.     function Get_Errors: icErrors;
  860.     function Get_DocInput: DocInput;
  861.     function Get_DocOutput: DocOutput;
  862.     function Get_Firewall: IFirewall;
  863.   protected
  864.     procedure InitControlData; override;
  865.     procedure InitControlInterface(const Obj: IUnknown); override;
  866.   public
  867.     procedure AboutBox;
  868.     procedure Cancel;
  869.     procedure Connect(RemoteHost, RemotePort: OleVariant);
  870.     procedure Authenticate(UserId, Password: OleVariant);
  871.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant);
  872.     procedure GetDoc(URL, Headers, OutputFile: OleVariant);
  873.     procedure Abort;
  874.     procedure Account(const Account: WideString);
  875.     procedure ChangeDir(const directory: WideString);
  876.     procedure CreateDir(const directory: WideString);
  877.     procedure DeleteDir(const directory: WideString);
  878.     procedure DeleteFile(const FileName: WideString);
  879.     procedure Quit;
  880.     procedure Help(const Help: WideString);
  881.     procedure Noop;
  882.     procedure Mode(ftpMode: FTPModeConstants);
  883.     procedure Type_(ftpType: FTPTypeConstants);
  884.     procedure List(const List: WideString);
  885.     procedure NameList(const NameList: WideString);
  886.     procedure ParentDir;
  887.     procedure PrintDir;
  888.     procedure Execute(const Execute: WideString);
  889.     procedure Status(const Status: WideString);
  890.     procedure PutFile(const srcFileName, destFileName: WideString);
  891.     procedure Reinitialize;
  892.     procedure System;
  893.     procedure GetFile(const srcFileName, destFileName: WideString);
  894.     procedure PutFileUnique(const FileName: WideString);
  895.     procedure Site(const Site: WideString);
  896.     property ControlInterface: Iftpct read FIntf;
  897.     property BlockResult: Smallint index 519 read GetSmallintProp;
  898.     property State: Smallint index 503 read GetSmallintProp;
  899.     property ProtocolState: Smallint index 504 read GetSmallintProp;
  900.     property ReplyString: WideString index 505 read GetWideStringProp;
  901.     property ReplyCode: Integer index 506 read GetIntegerProp;
  902.     property Timeout[event: Smallint]: Integer read Get_Timeout write Set_Timeout;
  903.     property EnableTimer[event: Smallint]: WordBool write Set_EnableTimer;
  904.     property Errors: icErrors read Get_Errors;
  905.     property Busy: WordBool index 509 read GetWordBoolProp;
  906.     property StateString: WideString index 511 read GetWideStringProp;
  907.     property ProtocolStateString: WideString index 512 read GetWideStringProp;
  908.     property SocketHandle: Integer index 518 read GetIntegerProp;
  909.     property DocInput: DocInput read Get_DocInput;
  910.     property DocOutput: DocOutput read Get_DocOutput;
  911.     property Operation: FTPOperationConstants index 5 read GetTOleEnumProp;
  912.     property Firewall: IFirewall read Get_Firewall;
  913.   published
  914.     property Blocking: WordBool index 515 read GetWordBoolProp write SetWordBoolProp stored False;
  915.     property SleepTime: Integer index 516 read GetIntegerProp write SetIntegerProp stored False;
  916.     property RemoteHost: WideString index 0 read GetWideStringProp write SetWideStringProp stored False;
  917.     property RemotePort: Integer index 502 read GetIntegerProp write SetIntegerProp stored False;
  918.     property NotificationMode: Smallint index 510 read GetSmallintProp write SetSmallintProp stored False;
  919.     property Logging: WordBool index 514 read GetWordBoolProp write SetWordBoolProp stored False;
  920.     property LocalPort: Integer index 517 read GetIntegerProp write SetIntegerProp stored False;
  921.     property UserId: WideString index 601 read GetWideStringProp write SetWideStringProp stored False;
  922.     property Password: WideString index 602 read GetWideStringProp write SetWideStringProp stored False;
  923.     property URL: WideString index 1001 read GetWideStringProp write SetWideStringProp stored False;
  924.     property AppendToFile: WordBool index 1 read GetWordBoolProp write SetWordBoolProp stored False;
  925.     property ListItemNotify: WordBool index 2 read GetWordBoolProp write SetWordBoolProp stored False;
  926.     property RemoteFile: WideString index 3 read GetWideStringProp write SetWideStringProp stored False;
  927.     property PassiveMode: WordBool index 6 read GetWordBoolProp write SetWordBoolProp stored False;
  928.     property OnError: TFTPError read FOnError write FOnError;
  929.     property OnTimeout: TFTPTimeout read FOnTimeout write FOnTimeout;
  930.     property OnCancel: TNotifyEvent read FOnCancel write FOnCancel;
  931.     property OnStateChanged: TFTPStateChanged read FOnStateChanged write FOnStateChanged;
  932.     property OnProtocolStateChanged: TFTPProtocolStateChanged read FOnProtocolStateChanged write FOnProtocolStateChanged;
  933.     property OnBusy: TFTPBusy read FOnBusy write FOnBusy;
  934.     property OnLog: TNotifyEvent read FOnLog write FOnLog;
  935.     property OnDocInput: TFTPDocInput read FOnDocInput write FOnDocInput;
  936.     property OnDocOutput: TFTPDocOutput read FOnDocOutput write FOnDocOutput;
  937.     property OnAbort: TNotifyEvent read FOnAbort write FOnAbort;
  938.     property OnAccount: TNotifyEvent read FOnAccount write FOnAccount;
  939.     property OnChangeDir: TNotifyEvent read FOnChangeDir write FOnChangeDir;
  940.     property OnCreateDir: TNotifyEvent read FOnCreateDir write FOnCreateDir;
  941.     property OnDeleteDir: TNotifyEvent read FOnDeleteDir write FOnDeleteDir;
  942.     property OnDelFile: TNotifyEvent read FOnDelFile write FOnDelFile;
  943.     property OnHelp: TNotifyEvent read FOnHelp write FOnHelp;
  944.     property OnMode: TNotifyEvent read FOnMode write FOnMode;
  945.     property OnNoop: TNotifyEvent read FOnNoop write FOnNoop;
  946.     property OnParentDir: TNotifyEvent read FOnParentDir write FOnParentDir;
  947.     property OnPrintDir: TNotifyEvent read FOnPrintDir write FOnPrintDir;
  948.     property OnExecute: TNotifyEvent read FOnExecute write FOnExecute;
  949.     property OnStatus: TNotifyEvent read FOnStatus write FOnStatus;
  950.     property OnReinitialize: TNotifyEvent read FOnReinitialize write FOnReinitialize;
  951.     property OnSystem: TNotifyEvent read FOnSystem write FOnSystem;
  952.     property OnSite: TNotifyEvent read FOnSite write FOnSite;
  953.     property OnType_: TNotifyEvent read FOnType_ write FOnType_;
  954.     property OnListItem: TFTPListItem read FOnListItem write FOnListItem;
  955.     property OnFirewallStateChanged: TFTPFirewallStateChanged read FOnFirewallStateChanged write FOnFirewallStateChanged;
  956.   end;
  957.  
  958. const
  959.   LIBID_HTTPCTLib: TGUID = '{B7FC355F-8CE7-11CF-9754-00AA00C00908}';
  960.  
  961. const
  962.  
  963. { MethodConstants }
  964.  
  965.   prcGet = 1;
  966.   prcHead = 2;
  967.   prcPost = 3;
  968.   prcPut = 4;
  969.  
  970. { HTTPProtocolStateConstants }
  971.  
  972.   httpBase = 0;
  973.   httpTransferring = 1;
  974.  
  975. const
  976.  
  977. { Component class GUIDs }
  978.   Class_Proxy: TGUID = '{70F78900-F452-11CF-A306-00A0243B6C29}';
  979.   Class_HTTP: TGUID = '{B7FC3563-8CE7-11CF-9754-00AA00C00908}';
  980.  
  981. type
  982.  
  983. { Forward declarations }
  984. { Forward declarations: Interfaces }
  985.   IHttpProxy = interface;
  986.   IHttpProxyDisp = dispinterface;
  987.   IHTTPCT = interface;
  988.   IHTTPCTDisp = dispinterface;
  989.   DHTTPCTEvents = dispinterface;
  990.  
  991. { Forward declarations: CoClasses }
  992.   Proxy = IHttpProxy;
  993.   HTTP = IHTTPCT;
  994.  
  995. { Forward declarations: Enums }
  996.   MethodConstants = TOleEnum;
  997.   HTTPProtocolStateConstants = TOleEnum;
  998.  
  999. { Proxy Object }
  1000.  
  1001.   IHttpProxy = interface(IDispatch)
  1002.     ['{6FB8A060-F452-11CF-A306-00A0243B6C29}']
  1003.     function Get_Mode: WordBool; safecall;
  1004.     procedure Set_Mode(Value: WordBool); safecall;
  1005.     function Get_Host: WideString; safecall;
  1006.     procedure Set_Host(const Value: WideString); safecall;
  1007.     function Get_Port: Integer; safecall;
  1008.     procedure Set_Port(Value: Integer); safecall;
  1009.     property Mode: WordBool read Get_Mode write Set_Mode;
  1010.     property Host: WideString read Get_Host write Set_Host;
  1011.     property Port: Integer read Get_Port write Set_Port;
  1012.   end;
  1013.  
  1014. { DispInterface declaration for Dual Interface IHttpProxy }
  1015.  
  1016.   IHttpProxyDisp = dispinterface
  1017.     ['{6FB8A060-F452-11CF-A306-00A0243B6C29}']
  1018.     property Mode: WordBool dispid 20;
  1019.     property Host: WideString dispid 22;
  1020.     property Port: Integer dispid 23;
  1021.   end;
  1022.  
  1023. { Properties/Methods for NetManage HTTP Client Control }
  1024.  
  1025.   IHTTPCT = interface(INMOleControl)
  1026.     ['{B7FC3561-8CE7-11CF-9754-00AA00C00908}']
  1027.     function Get_RemoteHost: WideString; safecall;
  1028.     procedure Set_RemoteHost(const Value: WideString); safecall;
  1029.     function Get_RemotePort: Integer; safecall;
  1030.     procedure Set_RemotePort(Value: Integer); safecall;
  1031.     function Get_State: Smallint; safecall;
  1032.     function Get_ProtocolState: Smallint; safecall;
  1033.     function Get_ReplyString: WideString; safecall;
  1034.     function Get_ReplyCode: Integer; safecall;
  1035.     function Get_Timeout(event: Smallint): Integer; safecall;
  1036.     procedure Set_Timeout(event: Smallint; Value: Integer); safecall;
  1037.     procedure Set_EnableTimer(event: Smallint; Value: WordBool); safecall;
  1038.     function Get_Errors: icErrors; safecall;
  1039.     function Get_Busy: WordBool; safecall;
  1040.     function Get_NotificationMode: Smallint; safecall;
  1041.     procedure Set_NotificationMode(Value: Smallint); safecall;
  1042.     function Get_StateString: WideString; safecall;
  1043.     function Get_ProtocolStateString: WideString; safecall;
  1044.     function Get_Logging: WordBool; safecall;
  1045.     procedure Set_Logging(Value: WordBool); safecall;
  1046.     function Get_LocalPort: Integer; safecall;
  1047.     procedure Set_LocalPort(Value: Integer); safecall;
  1048.     function Get_SocketHandle: Integer; safecall;
  1049.     procedure Cancel; safecall;
  1050.     property RemoteHost: WideString read Get_RemoteHost write Set_RemoteHost;
  1051.     property RemotePort: Integer read Get_RemotePort write Set_RemotePort;
  1052.     property State: Smallint read Get_State;
  1053.     property ProtocolState: Smallint read Get_ProtocolState;
  1054.     property ReplyString: WideString read Get_ReplyString;
  1055.     property ReplyCode: Integer read Get_ReplyCode;
  1056.     property Timeout[event: Smallint]: Integer read Get_Timeout write Set_Timeout;
  1057.     property EnableTimer[event: Smallint]: WordBool write Set_EnableTimer;
  1058.     property Errors: icErrors read Get_Errors;
  1059.     property Busy: WordBool read Get_Busy;
  1060.     property NotificationMode: Smallint read Get_NotificationMode write Set_NotificationMode;
  1061.     property StateString: WideString read Get_StateString;
  1062.     property ProtocolStateString: WideString read Get_ProtocolStateString;
  1063.     property Logging: WordBool read Get_Logging write Set_Logging;
  1064.     property LocalPort: Integer read Get_LocalPort write Set_LocalPort;
  1065.     property SocketHandle: Integer read Get_SocketHandle;
  1066.  
  1067.     function Get_Document: WideString; safecall;
  1068.     procedure Set_Document(const Value: WideString); safecall;
  1069.     function Get_Method: MethodConstants; safecall;
  1070.     procedure Set_Method(Value: MethodConstants); safecall;
  1071.     function Get_URL: WideString; safecall;
  1072.     procedure Set_URL(const Value: WideString); safecall;
  1073.     function Get_DocInput: DocInput; safecall;
  1074.     function Get_DocOutput: DocOutput; safecall;
  1075.     function Get_Proxy: IHttpProxy; safecall;
  1076.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant); safecall;
  1077.     procedure GetDoc(URL, Headers, OutputFile: OleVariant); safecall;
  1078.     property Document: WideString read Get_Document write Set_Document;
  1079.     property Method: MethodConstants read Get_Method write Set_Method;
  1080.     property URL: WideString read Get_URL write Set_URL;
  1081.     property DocInput: DocInput read Get_DocInput;
  1082.     property DocOutput: DocOutput read Get_DocOutput;
  1083.     property Proxy: IHttpProxy read Get_Proxy;
  1084.   end;
  1085.  
  1086. { DispInterface declaration for Dual Interface IHTTPCT }
  1087.  
  1088.   IHTTPCTDisp = dispinterface
  1089.     ['{B7FC3561-8CE7-11CF-9754-00AA00C00908}']
  1090.     property Document: WideString dispid 10;
  1091.     property Method: MethodConstants dispid 11;
  1092.     property URL: WideString dispid 1001;
  1093.     property DocInput: DocInput readonly dispid 1002;
  1094.     property DocOutput: DocOutput readonly dispid 1003;
  1095.     property Proxy: IHttpProxy readonly dispid 21;
  1096.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant); dispid 1005;
  1097.     procedure GetDoc(URL, Headers, OutputFile: OleVariant); dispid 1004;
  1098.   end;
  1099.  
  1100. { Event interface for NetManage HTTP Client Control }
  1101.  
  1102.   DHTTPCTEvents = dispinterface
  1103.     ['{B7FC3562-8CE7-11CF-9754-00AA00C00908}']
  1104.     procedure Error(Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool); dispid -608;
  1105.     procedure Timeout(event: Smallint; var Continue: WordBool); dispid 551;
  1106.     procedure Cancel; dispid 552;
  1107.     procedure StateChanged(State: Smallint); dispid 553;
  1108.     procedure ProtocolStateChanged(ProtocolState: Smallint); dispid 554;
  1109.     procedure Busy(isBusy: WordBool); dispid 555;
  1110.     procedure Log; dispid 556;
  1111.     procedure DocInput(const DocInput: DocInput); dispid 1016;
  1112.     procedure DocOutput(const DocOutput: DocOutput); dispid 1017;
  1113.   end;
  1114.  
  1115. { Proxy Object }
  1116.  
  1117.   CoProxy = class
  1118.     class function Create: IHttpProxy;
  1119.     class function CreateRemote(const MachineName: string): IHttpProxy;
  1120.   end;
  1121.  
  1122. { NetManage HTTP Client Control }
  1123.  
  1124.   THTTPError = procedure(Sender: TObject; Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool) of object;
  1125.   THTTPTimeout = procedure(Sender: TObject; event: Smallint; var Continue: WordBool) of object;
  1126.   THTTPStateChanged = procedure(Sender: TObject; State: Smallint) of object;
  1127.   THTTPProtocolStateChanged = procedure(Sender: TObject; ProtocolState: Smallint) of object;
  1128.   THTTPBusy = procedure(Sender: TObject; isBusy: WordBool) of object;
  1129.   THTTPDocInput = procedure(Sender: TObject; const DocInput: DocInput) of object;
  1130.   THTTPDocOutput = procedure(Sender: TObject; const DocOutput: DocOutput) of object;
  1131.  
  1132.   THTTP = class(TOleControl)
  1133.   private
  1134.     FOnError: THTTPError;
  1135.     FOnTimeout: THTTPTimeout;
  1136.     FOnCancel: TNotifyEvent;
  1137.     FOnStateChanged: THTTPStateChanged;
  1138.     FOnProtocolStateChanged: THTTPProtocolStateChanged;
  1139.     FOnBusy: THTTPBusy;
  1140.     FOnLog: TNotifyEvent;
  1141.     FOnDocInput: THTTPDocInput;
  1142.     FOnDocOutput: THTTPDocOutput;
  1143.     FIntf: IHTTPCT;
  1144.     function Get_Timeout(event: Smallint): Integer;
  1145.     procedure Set_Timeout(event: Smallint; Value: Integer);
  1146.     procedure Set_EnableTimer(event: Smallint; Value: WordBool);
  1147.     function Get_Errors: icErrors;
  1148.     function Get_DocInput: DocInput;
  1149.     function Get_DocOutput: DocOutput;
  1150.     function Get_Proxy: IHttpProxy;
  1151.   protected
  1152.     procedure InitControlData; override;
  1153.     procedure InitControlInterface(const Obj: IUnknown); override;
  1154.   public
  1155.     procedure AboutBox;
  1156.     procedure Cancel;
  1157.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant);
  1158.     procedure GetDoc(URL, Headers, OutputFile: OleVariant);
  1159.     property ControlInterface: IHTTPCT read FIntf;
  1160.     property BlockResult: Smallint index 519 read GetSmallintProp;
  1161.     property State: Smallint index 503 read GetSmallintProp;
  1162.     property ProtocolState: Smallint index 504 read GetSmallintProp;
  1163.     property ReplyString: WideString index 505 read GetWideStringProp;
  1164.     property ReplyCode: Integer index 506 read GetIntegerProp;
  1165.     property Timeout[event: Smallint]: Integer read Get_Timeout write Set_Timeout;
  1166.     property EnableTimer[event: Smallint]: WordBool write Set_EnableTimer;
  1167.     property Errors: icErrors read Get_Errors;
  1168.     property Busy: WordBool index 509 read GetWordBoolProp;
  1169.     property StateString: WideString index 511 read GetWideStringProp;
  1170.     property ProtocolStateString: WideString index 512 read GetWideStringProp;
  1171.     property SocketHandle: Integer index 518 read GetIntegerProp;
  1172.     property DocInput: DocInput read Get_DocInput;
  1173.     property DocOutput: DocOutput read Get_DocOutput;
  1174.     property Proxy: IHttpProxy read Get_Proxy;
  1175.   published
  1176.     property Blocking: WordBool index 515 read GetWordBoolProp write SetWordBoolProp stored False;
  1177.     property SleepTime: Integer index 516 read GetIntegerProp write SetIntegerProp stored False;
  1178.     property RemoteHost: WideString index 0 read GetWideStringProp write SetWideStringProp stored False;
  1179.     property RemotePort: Integer index 502 read GetIntegerProp write SetIntegerProp stored False;
  1180.     property NotificationMode: Smallint index 510 read GetSmallintProp write SetSmallintProp stored False;
  1181.     property Logging: WordBool index 514 read GetWordBoolProp write SetWordBoolProp stored False;
  1182.     property LocalPort: Integer index 517 read GetIntegerProp write SetIntegerProp stored False;
  1183.     property Document: WideString index 10 read GetWideStringProp write SetWideStringProp stored False;
  1184.     property Method: MethodConstants index 11 read GetTOleEnumProp write SetTOleEnumProp stored False;
  1185.     property URL: WideString index 1001 read GetWideStringProp write SetWideStringProp stored False;
  1186.     property OnError: THTTPError read FOnError write FOnError;
  1187.     property OnTimeout: THTTPTimeout read FOnTimeout write FOnTimeout;
  1188.     property OnCancel: TNotifyEvent read FOnCancel write FOnCancel;
  1189.     property OnStateChanged: THTTPStateChanged read FOnStateChanged write FOnStateChanged;
  1190.     property OnProtocolStateChanged: THTTPProtocolStateChanged read FOnProtocolStateChanged write FOnProtocolStateChanged;
  1191.     property OnBusy: THTTPBusy read FOnBusy write FOnBusy;
  1192.     property OnLog: TNotifyEvent read FOnLog write FOnLog;
  1193.     property OnDocInput: THTTPDocInput read FOnDocInput write FOnDocInput;
  1194.     property OnDocOutput: THTTPDocOutput read FOnDocOutput write FOnDocOutput;
  1195.   end;
  1196.  
  1197. const
  1198.   LIBID_HTMLObjects: TGUID = '{B7FC354D-8CE7-11CF-9754-00AA00C00908}';
  1199.  
  1200. { Component class GUIDs }
  1201.   Class_HTMLElementCls: TGUID = '{B7FC3550-8CE7-11CF-9754-00AA00C00908}';
  1202.   Class_HTMLFormCls: TGUID = '{B7FC3554-8CE7-11CF-9754-00AA00C00908}';
  1203.   Class_HTMLFormsCls: TGUID = '{B7FC3557-8CE7-11CF-9754-00AA00C00908}';
  1204.   Class_HTMLAttrCls: TGUID = '{B7FC3559-8CE7-11CF-9754-00AA00C00908}';
  1205.   Class_HTMLAttrsCls: TGUID = '{B7FC355B-8CE7-11CF-9754-00AA00C00908}';
  1206.   Class_HTML: TGUID = '{B7FC355E-8CE7-11CF-9754-00AA00C00908}';
  1207.  
  1208. type
  1209.  
  1210. { Forward declarations }
  1211. { Forward declarations: Interfaces }
  1212.   HTMLElement = interface;
  1213.   HTMLElementDisp = dispinterface;
  1214.   HTMLForm = interface;
  1215.   HTMLFormDisp = dispinterface;
  1216.   HTMLForms = interface;
  1217.   HTMLFormsDisp = dispinterface;
  1218.   HTMLAttr = interface;
  1219.   HTMLAttrDisp = dispinterface;
  1220.   HTMLAttrs = interface;
  1221.   HTMLAttrsDisp = dispinterface;
  1222.   IHTML = interface;
  1223.   IHTMLDisp = dispinterface;
  1224.   DHTMLEvents = dispinterface;
  1225.  
  1226. { Forward declarations: CoClasses }
  1227.   HTMLElementCls = HTMLElement;
  1228.   HTMLFormCls = HTMLForm;
  1229.   HTMLFormsCls = HTMLForms;
  1230.   HTMLAttrCls = HTMLAttr;
  1231.   HTMLAttrsCls = HTMLAttrs;
  1232.   HTML = IHTML;
  1233.  
  1234. { HTML Element properties and methods }
  1235.  
  1236.   HTMLElement = interface(IDispatch)
  1237.     ['{B7FC354E-8CE7-11CF-9754-00AA00C00908}']
  1238.   end;
  1239.  
  1240. { DispInterface declaration for Dual Interface HTMLElement }
  1241.  
  1242.   HTMLElementDisp = dispinterface
  1243.     ['{B7FC354E-8CE7-11CF-9754-00AA00C00908}']
  1244.   end;
  1245.  
  1246. { HTML Form properties and methods }
  1247.  
  1248.   HTMLForm = interface(IDispatch)
  1249.     ['{B7FC3551-8CE7-11CF-9754-00AA00C00908}']
  1250.     function Get_Method: WideString; safecall;
  1251.     function Get_URL: WideString; safecall;
  1252.     function Get_URLEncodedBody: WideString; safecall;
  1253.     procedure RequestSubmit; safecall;
  1254.     function Get_CPPObject: SYSINT; safecall;
  1255.     procedure Set_CPPObject(Value: SYSINT); safecall;
  1256.     property Method: WideString read Get_Method;
  1257.     property URL: WideString read Get_URL;
  1258.     property URLEncodedBody: WideString read Get_URLEncodedBody;
  1259.     property CPPObject: SYSINT read Get_CPPObject write Set_CPPObject;
  1260.   end;
  1261.  
  1262. { DispInterface declaration for Dual Interface HTMLForm }
  1263.  
  1264.   HTMLFormDisp = dispinterface
  1265.     ['{B7FC3551-8CE7-11CF-9754-00AA00C00908}']
  1266.     property Method: WideString readonly dispid 1;
  1267.     property URL: WideString readonly dispid 2;
  1268.     property URLEncodedBody: WideString readonly dispid 3;
  1269.     procedure RequestSubmit; dispid 4;
  1270.     property CPPObject: SYSINT dispid 100;
  1271.   end;
  1272.  
  1273. { HTML Forms collection properties and methods }
  1274.  
  1275.   HTMLForms = interface(IDispatch)
  1276.     ['{B7FC3555-8CE7-11CF-9754-00AA00C00908}']
  1277.     function Get_Count: Integer; safecall;
  1278.     function Get__NewEnum: IUnknown; safecall;
  1279.     function Item(Index: OleVariant): HTMLForm; safecall;
  1280.     function Get_CPPObject: SYSINT; safecall;
  1281.     procedure Set_CPPObject(Value: SYSINT); safecall;
  1282.     property Count: Integer read Get_Count;
  1283.     property _NewEnum: IUnknown read Get__NewEnum;
  1284.     property CPPObject: SYSINT read Get_CPPObject write Set_CPPObject;
  1285.   end;
  1286.  
  1287. { DispInterface declaration for Dual Interface HTMLForms }
  1288.  
  1289.   HTMLFormsDisp = dispinterface
  1290.     ['{B7FC3555-8CE7-11CF-9754-00AA00C00908}']
  1291.     property Count: Integer readonly dispid 1;
  1292.     property _NewEnum: IUnknown readonly dispid -4;
  1293.     function Item(Index: OleVariant): HTMLForm; dispid 2;
  1294.     property CPPObject: SYSINT dispid 100;
  1295.   end;
  1296.  
  1297. { HTML Attribute properties and methods }
  1298.  
  1299.   HTMLAttr = interface(IDispatch)
  1300.     ['{B7FC3558-8CE7-11CF-9754-00AA00C00908}']
  1301.     function Get_Name: WideString; safecall;
  1302.     function Get_Value: WideString; safecall;
  1303.     function Get_CPPObject: SYSINT; safecall;
  1304.     procedure Set_CPPObject(Value: SYSINT); safecall;
  1305.     property Name: WideString read Get_Name;
  1306.     property Value: WideString read Get_Value;
  1307.     property CPPObject: SYSINT read Get_CPPObject write Set_CPPObject;
  1308.   end;
  1309.  
  1310. { DispInterface declaration for Dual Interface HTMLAttr }
  1311.  
  1312.   HTMLAttrDisp = dispinterface
  1313.     ['{B7FC3558-8CE7-11CF-9754-00AA00C00908}']
  1314.     property Name: WideString readonly dispid 1;
  1315.     property Value: WideString readonly dispid 2;
  1316.     property CPPObject: SYSINT dispid 100;
  1317.   end;
  1318.  
  1319. { HTML Attributes collection properties and methods }
  1320.  
  1321.   HTMLAttrs = interface(IDispatch)
  1322.     ['{B7FC355A-8CE7-11CF-9754-00AA00C00908}']
  1323.     function Get_Count: Integer; safecall;
  1324.     function Get__NewEnum: IUnknown; safecall;
  1325.     function Item(Index: OleVariant): HTMLAttr; safecall;
  1326.     function Get_CPPObject: SYSINT; safecall;
  1327.     procedure Set_CPPObject(Value: SYSINT); safecall;
  1328.     procedure Set_InternalCount(Value: Integer); safecall;
  1329.     property Count: Integer read Get_Count;
  1330.     property _NewEnum: IUnknown read Get__NewEnum;
  1331.     property CPPObject: SYSINT read Get_CPPObject write Set_CPPObject;
  1332.     property InternalCount: Integer write Set_InternalCount;
  1333.   end;
  1334.  
  1335. { DispInterface declaration for Dual Interface HTMLAttrs }
  1336.  
  1337.   HTMLAttrsDisp = dispinterface
  1338.     ['{B7FC355A-8CE7-11CF-9754-00AA00C00908}']
  1339.     property Count: Integer readonly dispid 1;
  1340.     property _NewEnum: IUnknown readonly dispid -4;
  1341.     function Item(Index: OleVariant): HTMLAttr; dispid 2;
  1342.     property CPPObject: SYSINT dispid 100;
  1343.     property InternalCount: Integer writeonly dispid 3;
  1344.   end;
  1345.  
  1346. { Properties/Methods for NetManage HTML Control }
  1347.  
  1348.   IHTML = interface(INMOleControl)
  1349.     ['{B7FC355C-8CE7-11CF-9754-00AA00C00908}']
  1350.     function Get_DocInput: DocInput; safecall;
  1351.     function Get_DocOutput: DocOutput; safecall;
  1352.     function Get_URL: WideString; safecall;
  1353.     function Get_RequestURL: WideString; safecall;
  1354.     function Get_BaseURL: WideString; safecall;
  1355.     function Get_Forms: HTMLForms; safecall;
  1356.     function Get_TotalWidth: Integer; safecall;
  1357.     function Get_TotalHeight: Integer; safecall;
  1358.     function Get_RetrieveBytesTotal: Integer; safecall;
  1359.     function Get_RetrieveBytesDone: Integer; safecall;
  1360.     function Get_ParseDone: WordBool; safecall;
  1361.     function Get_LayoutDone: WordBool; safecall;
  1362.     function Get_DeferRetrieval: WordBool; safecall;
  1363.     procedure Set_DeferRetrieval(Value: WordBool); safecall;
  1364.     function Get_ViewSource: WordBool; safecall;
  1365.     procedure Set_ViewSource(Value: WordBool); safecall;
  1366.     function Get_RetainSource: WordBool; safecall;
  1367.     procedure Set_RetainSource(Value: WordBool); safecall;
  1368.     function Get_SourceText: WideString; safecall;
  1369.     function Get_ElemNotification: WordBool; safecall;
  1370.     procedure Set_ElemNotification(Value: WordBool); safecall;
  1371.     function Get_Timeout: Integer; safecall;
  1372.     procedure Set_Timeout(Value: Integer); safecall;
  1373.     function Get_Redraw: WordBool; safecall;
  1374.     procedure Set_Redraw(Value: WordBool); safecall;
  1375.     function Get_UnderlineLinks: WordBool; safecall;
  1376.     procedure Set_UnderlineLinks(Value: WordBool); safecall;
  1377.     function Get_UseDocColors: WordBool; safecall;
  1378.     procedure Set_UseDocColors(Value: WordBool); safecall;
  1379.     function Get_BackImage: WideString; safecall;
  1380.     procedure Set_BackImage(const Value: WideString); safecall;
  1381.     function Get_BackColor: TColor; safecall;
  1382.     procedure Set_BackColor(Value: TColor); safecall;
  1383.     function Get_ForeColor: TColor; safecall;
  1384.     procedure Set_ForeColor(Value: TColor); safecall;
  1385.     function Get_LinkColor: TColor; safecall;
  1386.     procedure Set_LinkColor(Value: TColor); safecall;
  1387.     function Get_VisitedColor: TColor; safecall;
  1388.     procedure Set_VisitedColor(Value: TColor); safecall;
  1389.     function Get_DocBackColor: TColor; safecall;
  1390.     function Get_DocForeColor: TColor; safecall;
  1391.     function Get_DocLinkColor: TColor; safecall;
  1392.     function Get_DocVisitedColor: TColor; safecall;
  1393.     function Get_Font: IFontDisp; safecall;
  1394.     procedure Set_Font(const Value: IFontDisp); safecall;
  1395.     function Get_FixedFont: IFontDisp; safecall;
  1396.     procedure Set_FixedFont(const Value: IFontDisp); safecall;
  1397.     function Get_Heading1Font: IFontDisp; safecall;
  1398.     procedure Set_Heading1Font(const Value: IFontDisp); safecall;
  1399.     function Get_Heading2Font: IFontDisp; safecall;
  1400.     procedure Set_Heading2Font(const Value: IFontDisp); safecall;
  1401.     function Get_Heading3Font: IFontDisp; safecall;
  1402.     procedure Set_Heading3Font(const Value: IFontDisp); safecall;
  1403.     function Get_Heading4Font: IFontDisp; safecall;
  1404.     procedure Set_Heading4Font(const Value: IFontDisp); safecall;
  1405.     function Get_Heading5Font: IFontDisp; safecall;
  1406.     procedure Set_Heading5Font(const Value: IFontDisp); safecall;
  1407.     function Get_Heading6Font: IFontDisp; safecall;
  1408.     procedure Set_Heading6Font(const Value: IFontDisp); safecall;
  1409.     function Get_IsPrintingDone(PageNumber: Integer): WordBool; safecall;
  1410.     procedure RequestDoc(const URL: WideString); safecall;
  1411.     procedure RequestAllEmbedded; safecall;
  1412.     procedure Cancel(Message: OleVariant); safecall;
  1413.     procedure BeginPrinting(hDC: Integer; x, y, Width, Height, DefaultHeaders, DefaultTitle: OleVariant); safecall;
  1414.     procedure PrintPage(hDC, PageNumber: Integer); safecall;
  1415.     procedure EndPrinting; safecall;
  1416.     procedure AutoPrint(hDC: Integer); safecall;
  1417.     function Get_Errors: icErrors; safecall;
  1418.     function Get_hWnd: OLE_HANDLE; safecall;
  1419.     function GetPlainText(selected, fancy: WordBool): WideString; safecall;
  1420.     function HasSelection: WordBool; safecall;
  1421.     procedure SelectAll; safecall;
  1422.     property DocInput: DocInput read Get_DocInput;
  1423.     property DocOutput: DocOutput read Get_DocOutput;
  1424.     property URL: WideString read Get_URL;
  1425.     property RequestURL: WideString read Get_RequestURL;
  1426.     property BaseURL: WideString read Get_BaseURL;
  1427.     property Forms: HTMLForms read Get_Forms;
  1428.     property TotalWidth: Integer read Get_TotalWidth;
  1429.     property TotalHeight: Integer read Get_TotalHeight;
  1430.     property RetrieveBytesTotal: Integer read Get_RetrieveBytesTotal;
  1431.     property RetrieveBytesDone: Integer read Get_RetrieveBytesDone;
  1432.     property ParseDone: WordBool read Get_ParseDone;
  1433.     property LayoutDone: WordBool read Get_LayoutDone;
  1434.     property DeferRetrieval: WordBool read Get_DeferRetrieval write Set_DeferRetrieval;
  1435.     property ViewSource: WordBool read Get_ViewSource write Set_ViewSource;
  1436.     property RetainSource: WordBool read Get_RetainSource write Set_RetainSource;
  1437.     property SourceText: WideString read Get_SourceText;
  1438.     property ElemNotification: WordBool read Get_ElemNotification write Set_ElemNotification;
  1439.     property Timeout: Integer read Get_Timeout write Set_Timeout;
  1440.     property Redraw: WordBool read Get_Redraw write Set_Redraw;
  1441.     property UnderlineLinks: WordBool read Get_UnderlineLinks write Set_UnderlineLinks;
  1442.     property UseDocColors: WordBool read Get_UseDocColors write Set_UseDocColors;
  1443.     property BackImage: WideString read Get_BackImage write Set_BackImage;
  1444.     property BackColor: TColor read Get_BackColor write Set_BackColor;
  1445.     property ForeColor: TColor read Get_ForeColor write Set_ForeColor;
  1446.     property LinkColor: TColor read Get_LinkColor write Set_LinkColor;
  1447.     property VisitedColor: TColor read Get_VisitedColor write Set_VisitedColor;
  1448.     property DocBackColor: TColor read Get_DocBackColor;
  1449.     property DocForeColor: TColor read Get_DocForeColor;
  1450.     property DocLinkColor: TColor read Get_DocLinkColor;
  1451.     property DocVisitedColor: TColor read Get_DocVisitedColor;
  1452.     property Font: IFontDisp read Get_Font write Set_Font;
  1453.     property FixedFont: IFontDisp read Get_FixedFont write Set_FixedFont;
  1454.     property Heading1Font: IFontDisp read Get_Heading1Font write Set_Heading1Font;
  1455.     property Heading2Font: IFontDisp read Get_Heading2Font write Set_Heading2Font;
  1456.     property Heading3Font: IFontDisp read Get_Heading3Font write Set_Heading3Font;
  1457.     property Heading4Font: IFontDisp read Get_Heading4Font write Set_Heading4Font;
  1458.     property Heading5Font: IFontDisp read Get_Heading5Font write Set_Heading5Font;
  1459.     property Heading6Font: IFontDisp read Get_Heading6Font write Set_Heading6Font;
  1460.     property IsPrintingDone[PageNumber: Integer]: WordBool read Get_IsPrintingDone;
  1461.     property Errors: icErrors read Get_Errors;
  1462.     property hWnd: OLE_HANDLE read Get_hWnd;
  1463.   end;
  1464.  
  1465. { DispInterface declaration for Dual Interface IHTML }
  1466.  
  1467.   IHTMLDisp = dispinterface
  1468.     ['{B7FC355C-8CE7-11CF-9754-00AA00C00908}']
  1469.     property DocInput: DocInput readonly dispid 1002;
  1470.     property DocOutput: DocOutput readonly dispid 1003;
  1471.     property URL: WideString readonly dispid 1001;
  1472.     property RequestURL: WideString readonly dispid 2;
  1473.     property BaseURL: WideString readonly dispid 3;
  1474.     property Forms: HTMLForms readonly dispid 4;
  1475.     property TotalWidth: Integer readonly dispid 5;
  1476.     property TotalHeight: Integer readonly dispid 6;
  1477.     property RetrieveBytesTotal: Integer readonly dispid 7;
  1478.     property RetrieveBytesDone: Integer readonly dispid 8;
  1479.     property ParseDone: WordBool readonly dispid 9;
  1480.     property LayoutDone: WordBool readonly dispid 10;
  1481.     property DeferRetrieval: WordBool dispid 11;
  1482.     property ViewSource: WordBool dispid 12;
  1483.     property RetainSource: WordBool dispid 13;
  1484.     property SourceText: WideString readonly dispid 14;
  1485.     property ElemNotification: WordBool dispid 15;
  1486.     property Timeout: Integer dispid 507;
  1487.     property Redraw: WordBool dispid 17;
  1488.     property UnderlineLinks: WordBool dispid 18;
  1489.     property UseDocColors: WordBool dispid 19;
  1490.     property BackImage: WideString dispid 20;
  1491.     property BackColor: TColor dispid -501;
  1492.     property ForeColor: TColor dispid -513;
  1493.     property LinkColor: TColor dispid 21;
  1494.     property VisitedColor: TColor dispid 22;
  1495.     property DocBackColor: TColor readonly dispid 23;
  1496.     property DocForeColor: TColor readonly dispid 24;
  1497.     property DocLinkColor: TColor readonly dispid 25;
  1498.     property DocVisitedColor: TColor readonly dispid 26;
  1499.     property Font: IFontDisp dispid -512;
  1500.     property FixedFont: IFontDisp dispid 27;
  1501.     property Heading1Font: IFontDisp dispid 28;
  1502.     property Heading2Font: IFontDisp dispid 29;
  1503.     property Heading3Font: IFontDisp dispid 30;
  1504.     property Heading4Font: IFontDisp dispid 31;
  1505.     property Heading5Font: IFontDisp dispid 32;
  1506.     property Heading6Font: IFontDisp dispid 33;
  1507.     property IsPrintingDone[PageNumber: Integer]: WordBool readonly dispid 39;
  1508.     procedure RequestDoc(const URL: WideString); dispid 34;
  1509.     procedure RequestAllEmbedded; dispid 35;
  1510.     procedure Cancel(Message: OleVariant); dispid 520;
  1511.     procedure BeginPrinting(hDC: Integer; x, y, Width, Height, DefaultHeaders, DefaultTitle: OleVariant); dispid 36;
  1512.     procedure PrintPage(hDC, PageNumber: Integer); dispid 37;
  1513.     procedure EndPrinting; dispid 38;
  1514.     procedure AutoPrint(hDC: Integer); dispid 50;
  1515.     property Errors: icErrors readonly dispid 508;
  1516.     property hWnd: OLE_HANDLE readonly dispid -515;
  1517.     function GetPlainText(selected, fancy: WordBool): WideString; dispid 41;
  1518.     function HasSelection: WordBool; dispid 42;
  1519.     procedure SelectAll; dispid 43;
  1520.   end;
  1521.  
  1522. { HTML Control events }
  1523.  
  1524.   DHTMLEvents = dispinterface
  1525.     ['{B7FC355D-8CE7-11CF-9754-00AA00C00908}']
  1526.     procedure Error(Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool); dispid -608;
  1527.     procedure DocInput(const DocInput: DocInput); dispid 1016;
  1528.     procedure DocOutput(const DocOutput: DocOutput); dispid 1017;
  1529.     procedure ParseComplete; dispid 1;
  1530.     procedure LayoutComplete; dispid 2;
  1531.     procedure Timeout; dispid 551;
  1532.     procedure BeginRetrieval; dispid 4;
  1533.     procedure UpdateRetrieval; dispid 5;
  1534.     procedure EndRetrieval; dispid 6;
  1535.     procedure DoRequestDoc(const URL: WideString; const Element: HTMLElement; const DocInput: DocInput; var EnableDefault: WordBool); dispid 7;
  1536.     procedure DoRequestEmbedded(const URL: WideString; const Element: HTMLElement; const DocInput: DocInput; var EnableDefault: WordBool); dispid 8;
  1537.     procedure DoRequestSubmit(const URL: WideString; const Form: HTMLForm; const DocOutput: DocOutput; var EnableDefault: WordBool); dispid 9;
  1538.     procedure DoNewElement(const ElemType: WideString; EndTag: WordBool; const Attrs: HTMLAttrs; const text: WideString; var EnableDefault: WordBool); dispid 10;
  1539.     procedure KeyPress(KeyAscii: Smallint); dispid -603;
  1540.     procedure KeyDown(KeyCode, Shift: Smallint); dispid -602;
  1541.     procedure KeyUp(KeyCode, Shift: Smallint); dispid -604;
  1542.     procedure Click; dispid -600;
  1543.     procedure DblClick; dispid -601;
  1544.     procedure MouseDown(Button, Shift: Smallint; x: OLE_XPOS_PIXELS; y: OLE_YPOS_PIXELS); dispid -605;
  1545.     procedure MouseMove(Button, Shift: Smallint; x: OLE_XPOS_PIXELS; y: OLE_YPOS_PIXELS); dispid -606;
  1546.     procedure MouseUp(Button, Shift: Smallint; x: OLE_XPOS_PIXELS; y: OLE_YPOS_PIXELS); dispid -607;
  1547.   end;
  1548.  
  1549. { HTML Element }
  1550.  
  1551.   CoHTMLElementCls = class
  1552.     class function Create: HTMLElement;
  1553.     class function CreateRemote(const MachineName: string): HTMLElement;
  1554.   end;
  1555.  
  1556. { HTML Form object }
  1557.  
  1558.   CoHTMLFormCls = class
  1559.     class function Create: HTMLForm;
  1560.     class function CreateRemote(const MachineName: string): HTMLForm;
  1561.   end;
  1562.  
  1563. { HTML Forms collection }
  1564.  
  1565.   CoHTMLFormsCls = class
  1566.     class function Create: HTMLForms;
  1567.     class function CreateRemote(const MachineName: string): HTMLForms;
  1568.   end;
  1569.  
  1570. { HTML Attribute object }
  1571.  
  1572.   CoHTMLAttrCls = class
  1573.     class function Create: HTMLAttr;
  1574.     class function CreateRemote(const MachineName: string): HTMLAttr;
  1575.   end;
  1576.  
  1577. { HTML Attributes collection }
  1578.  
  1579.   CoHTMLAttrsCls = class
  1580.     class function Create: HTMLAttrs;
  1581.     class function CreateRemote(const MachineName: string): HTMLAttrs;
  1582.   end;
  1583.  
  1584. { NetManage HTML Client Control }
  1585.  
  1586.   THTMLError = procedure(Sender: TObject; Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool) of object;
  1587.   THTMLDocInput = procedure(Sender: TObject; const DocInput: DocInput) of object;
  1588.   THTMLDocOutput = procedure(Sender: TObject; const DocOutput: DocOutput) of object;
  1589.   THTMLDoRequestDoc = procedure(Sender: TObject; const URL: WideString; const Element: HTMLElement; const DocInput: DocInput; var EnableDefault: WordBool) of object;
  1590.   THTMLDoRequestEmbedded = procedure(Sender: TObject; const URL: WideString; const Element: HTMLElement; const DocInput: DocInput; var EnableDefault: WordBool) of object;
  1591.   THTMLDoRequestSubmit = procedure(Sender: TObject; const URL: WideString; const Form: HTMLForm; const DocOutput: DocOutput; var EnableDefault: WordBool) of object;
  1592.   THTMLDoNewElement = procedure(Sender: TObject; const ElemType: WideString; EndTag: WordBool; const Attrs: HTMLAttrs; const text: WideString; var EnableDefault: WordBool) of object;
  1593.  
  1594.   THTML = class(TOleControl)
  1595.   private
  1596.     FOnError: THTMLError;
  1597.     FOnDocInput: THTMLDocInput;
  1598.     FOnDocOutput: THTMLDocOutput;
  1599.     FOnParseComplete: TNotifyEvent;
  1600.     FOnLayoutComplete: TNotifyEvent;
  1601.     FOnTimeout: TNotifyEvent;
  1602.     FOnBeginRetrieval: TNotifyEvent;
  1603.     FOnUpdateRetrieval: TNotifyEvent;
  1604.     FOnEndRetrieval: TNotifyEvent;
  1605.     FOnDoRequestDoc: THTMLDoRequestDoc;
  1606.     FOnDoRequestEmbedded: THTMLDoRequestEmbedded;
  1607.     FOnDoRequestSubmit: THTMLDoRequestSubmit;
  1608.     FOnDoNewElement: THTMLDoNewElement;
  1609.     FIntf: IHTML;
  1610.     function Get_DocInput: DocInput;
  1611.     function Get_DocOutput: DocOutput;
  1612.     function Get_Forms: HTMLForms;
  1613.     function Get_IsPrintingDone(PageNumber: Integer): WordBool;
  1614.     function Get_Errors: icErrors;
  1615.     function Get_hWnd: OLE_HANDLE;
  1616.   protected
  1617.     procedure InitControlData; override;
  1618.     procedure InitControlInterface(const Obj: IUnknown); override;
  1619.   public
  1620.     procedure AboutBox;
  1621.     procedure RequestDoc(const URL: WideString);
  1622.     procedure RequestAllEmbedded;
  1623.     procedure Cancel(Message: OleVariant);
  1624.     procedure BeginPrinting(hDC: Integer; x, y, Width, Height, DefaultHeaders, DefaultTitle: OleVariant);
  1625.     procedure PrintPage(hDC, PageNumber: Integer);
  1626.     procedure EndPrinting;
  1627.     procedure AutoPrint(hDC: Integer);
  1628.     function GetPlainText(selected, fancy: WordBool): WideString;
  1629.     function HasSelection: WordBool;
  1630.     procedure SelectAll;
  1631.     property ControlInterface: IHTML read FIntf;
  1632.     property BlockResult: Smallint index 519 read GetSmallintProp;
  1633.     property DocInput: DocInput read Get_DocInput;
  1634.     property DocOutput: DocOutput read Get_DocOutput;
  1635.     property URL: WideString index 1001 read GetWideStringProp;
  1636.     property RequestURL: WideString index 2 read GetWideStringProp;
  1637.     property BaseURL: WideString index 3 read GetWideStringProp;
  1638.     property Forms: HTMLForms read Get_Forms;
  1639.     property TotalWidth: Integer index 5 read GetIntegerProp;
  1640.     property TotalHeight: Integer index 6 read GetIntegerProp;
  1641.     property RetrieveBytesTotal: Integer index 7 read GetIntegerProp;
  1642.     property RetrieveBytesDone: Integer index 8 read GetIntegerProp;
  1643.     property ParseDone: WordBool index 9 read GetWordBoolProp;
  1644.     property LayoutDone: WordBool index 10 read GetWordBoolProp;
  1645.     property SourceText: WideString index 14 read GetWideStringProp;
  1646.     property DocBackColor: TColor index 23 read GetTColorProp;
  1647.     property DocForeColor: TColor index 24 read GetTColorProp;
  1648.     property DocLinkColor: TColor index 25 read GetTColorProp;
  1649.     property DocVisitedColor: TColor index 26 read GetTColorProp;
  1650.     property IsPrintingDone[PageNumber: Integer]: WordBool read Get_IsPrintingDone;
  1651.     property Errors: icErrors read Get_Errors;
  1652.     property hWnd: OLE_HANDLE read Get_hWnd;
  1653.   published
  1654.     property ParentColor;
  1655.     property ParentFont;
  1656.     property TabStop;
  1657.     property Align;
  1658.     property DragCursor;
  1659.     property DragMode;
  1660.     property ParentShowHint;
  1661.     property PopupMenu;
  1662.     property ShowHint;
  1663.     property TabOrder;
  1664.     property Visible;
  1665.     property OnDragDrop;
  1666.     property OnDragOver;
  1667.     property OnEndDrag;
  1668.     property OnEnter;
  1669.     property OnExit;
  1670.     property OnStartDrag;
  1671.     property OnMouseUp;
  1672.     property OnMouseMove;
  1673.     property OnMouseDown;
  1674.     property OnKeyUp;
  1675.     property OnKeyPress;
  1676.     property OnKeyDown;
  1677.     property OnDblClick;
  1678.     property OnClick;
  1679.     property Blocking: WordBool index 515 read GetWordBoolProp write SetWordBoolProp stored False;
  1680.     property SleepTime: Integer index 516 read GetIntegerProp write SetIntegerProp stored False;
  1681.     property DeferRetrieval: WordBool index 11 read GetWordBoolProp write SetWordBoolProp stored False;
  1682.     property ViewSource: WordBool index 12 read GetWordBoolProp write SetWordBoolProp stored False;
  1683.     property RetainSource: WordBool index 13 read GetWordBoolProp write SetWordBoolProp stored False;
  1684.     property ElemNotification: WordBool index 15 read GetWordBoolProp write SetWordBoolProp stored False;
  1685.     property Timeout: Integer index 507 read GetIntegerProp write SetIntegerProp stored False;
  1686.     property Redraw: WordBool index 17 read GetWordBoolProp write SetWordBoolProp stored False;
  1687.     property UnderlineLinks: WordBool index 18 read GetWordBoolProp write SetWordBoolProp stored False;
  1688.     property UseDocColors: WordBool index 19 read GetWordBoolProp write SetWordBoolProp stored False;
  1689.     property BackImage: WideString index 20 read GetWideStringProp write SetWideStringProp stored False;
  1690.     property BackColor: TColor index -501 read GetTColorProp write SetTColorProp stored False;
  1691.     property ForeColor: TColor index -513 read GetTColorProp write SetTColorProp stored False;
  1692.     property LinkColor: TColor index 21 read GetTColorProp write SetTColorProp stored False;
  1693.     property VisitedColor: TColor index 22 read GetTColorProp write SetTColorProp stored False;
  1694.     property Font: TFont index -512 read GetTFontProp write SetTFontProp stored False;
  1695.     property FixedFont: TFont index 27 read GetTFontProp write SetTFontProp stored False;
  1696.     property Heading1Font: TFont index 28 read GetTFontProp write SetTFontProp stored False;
  1697.     property Heading2Font: TFont index 29 read GetTFontProp write SetTFontProp stored False;
  1698.     property Heading3Font: TFont index 30 read GetTFontProp write SetTFontProp stored False;
  1699.     property Heading4Font: TFont index 31 read GetTFontProp write SetTFontProp stored False;
  1700.     property Heading5Font: TFont index 32 read GetTFontProp write SetTFontProp stored False;
  1701.     property Heading6Font: TFont index 33 read GetTFontProp write SetTFontProp stored False;
  1702.     property OnError: THTMLError read FOnError write FOnError;
  1703.     property OnDocInput: THTMLDocInput read FOnDocInput write FOnDocInput;
  1704.     property OnDocOutput: THTMLDocOutput read FOnDocOutput write FOnDocOutput;
  1705.     property OnParseComplete: TNotifyEvent read FOnParseComplete write FOnParseComplete;
  1706.     property OnLayoutComplete: TNotifyEvent read FOnLayoutComplete write FOnLayoutComplete;
  1707.     property OnTimeout: TNotifyEvent read FOnTimeout write FOnTimeout;
  1708.     property OnBeginRetrieval: TNotifyEvent read FOnBeginRetrieval write FOnBeginRetrieval;
  1709.     property OnUpdateRetrieval: TNotifyEvent read FOnUpdateRetrieval write FOnUpdateRetrieval;
  1710.     property OnEndRetrieval: TNotifyEvent read FOnEndRetrieval write FOnEndRetrieval;
  1711.     property OnDoRequestDoc: THTMLDoRequestDoc read FOnDoRequestDoc write FOnDoRequestDoc;
  1712.     property OnDoRequestEmbedded: THTMLDoRequestEmbedded read FOnDoRequestEmbedded write FOnDoRequestEmbedded;
  1713.     property OnDoRequestSubmit: THTMLDoRequestSubmit read FOnDoRequestSubmit write FOnDoRequestSubmit;
  1714.     property OnDoNewElement: THTMLDoNewElement read FOnDoNewElement write FOnDoNewElement;
  1715.   end;
  1716.  
  1717. const
  1718.   LIBID_POPCTLib: TGUID = '{B7FC356A-8CE7-11CF-9754-00AA00C00908}';
  1719.  
  1720. { PopProtocolStateConstants }
  1721.  
  1722.   popBase = 0;
  1723.   popAuthorization = 1;
  1724.   popTransaction = 2;
  1725.   popUpdate = 3;
  1726.  
  1727. { Component class GUIDs }
  1728.   Class_POP: TGUID = '{B7FC356E-8CE7-11CF-9754-00AA00C00908}';
  1729.  
  1730. type
  1731.  
  1732. { Forward declarations }
  1733. { Forward declarations: Interfaces }
  1734.   Ipopct = interface;
  1735.   IpopctDisp = dispinterface;
  1736.   DpopctEvents = dispinterface;
  1737.  
  1738. { Forward declarations: CoClasses }
  1739.   POP = Ipopct;
  1740.  
  1741. { Forward declarations: Enums }
  1742.   PopProtocolStateConstants = TOleEnum;
  1743.  
  1744. { Properties/Methods for NetManage POP Client Control }
  1745.  
  1746.   Ipopct = interface(INMOleAuthClientControl)
  1747.     ['{B7FC356C-8CE7-11CF-9754-00AA00C00908}']
  1748.     function Get_URL: WideString; safecall;
  1749.     procedure Set_URL(const Value: WideString); safecall;
  1750.     function Get_DocOutput: DocOutput; safecall;
  1751.     function Get_TopSupported: WordBool; safecall;
  1752.     function Get_TopLines: Integer; safecall;
  1753.     procedure Set_TopLines(Value: Integer); safecall;
  1754.     function Get_MessageCount: Smallint; safecall;
  1755.     procedure GetDoc(URL, Headers, OutputFile: OleVariant); safecall;
  1756.     procedure MessageSize(MessageNumber: Smallint); safecall;
  1757.     procedure RetrieveMessage(MessageNumber: Smallint); safecall;
  1758.     procedure Delete(MessageNumber: Smallint); safecall;
  1759.     procedure Reset; safecall;
  1760.     procedure Last; safecall;
  1761.     procedure Noop; safecall;
  1762.     procedure TopMessage(MessageNumber: Smallint); safecall;
  1763.     procedure Quit; safecall;
  1764.     procedure RefreshMessageCount; safecall;
  1765.     property URL: WideString read Get_URL write Set_URL;
  1766.     property DocOutput: DocOutput read Get_DocOutput;
  1767.     property TopSupported: WordBool read Get_TopSupported;
  1768.     property TopLines: Integer read Get_TopLines write Set_TopLines;
  1769.     property MessageCount: Smallint read Get_MessageCount;
  1770.   end;
  1771.  
  1772. { DispInterface declaration for Dual Interface Ipopct }
  1773.  
  1774.   IpopctDisp = dispinterface
  1775.     ['{B7FC356C-8CE7-11CF-9754-00AA00C00908}']
  1776.     property URL: WideString dispid 1001;
  1777.     property DocOutput: DocOutput readonly dispid 1003;
  1778.     property TopSupported: WordBool readonly dispid 2452;
  1779.     property TopLines: Integer dispid 2453;
  1780.     property MessageCount: Smallint readonly dispid 2454;
  1781.     procedure GetDoc(URL, Headers, OutputFile: OleVariant); dispid 1004;
  1782.     procedure MessageSize(MessageNumber: Smallint); dispid 2456;
  1783.     procedure RetrieveMessage(MessageNumber: Smallint); dispid 2457;
  1784.     procedure Delete(MessageNumber: Smallint); dispid 2458;
  1785.     procedure Reset; dispid 2459;
  1786.     procedure Last; dispid 2460;
  1787.     procedure Noop; dispid 2455;
  1788.     procedure TopMessage(MessageNumber: Smallint); dispid 2461;
  1789.     procedure Quit; dispid 2462;
  1790.     procedure RefreshMessageCount; dispid 2500;
  1791.   end;
  1792.  
  1793. { Event interface for NetManage POP Client Control }
  1794.  
  1795.   DpopctEvents = dispinterface
  1796.     ['{B7FC356D-8CE7-11CF-9754-00AA00C00908}']
  1797.     procedure Error(Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool); dispid -608;
  1798.     procedure Timeout(event: Smallint; var Continue: WordBool); dispid 551;
  1799.     procedure Cancel; dispid 552;
  1800.     procedure StateChanged(State: Smallint); dispid 553;
  1801.     procedure ProtocolStateChanged(ProtocolState: Smallint); dispid 554;
  1802.     procedure Busy(isBusy: WordBool); dispid 555;
  1803.     procedure Log; dispid 556;
  1804.     procedure DocOutput(const DocOutput: DocOutput); dispid 1017;
  1805.     procedure MessageSize(msgSize: Integer); dispid 2465;
  1806.     procedure Delete; dispid 2466;
  1807.     procedure Reset; dispid 2467;
  1808.     procedure Last(Number: Integer); dispid 2468;
  1809.     procedure Noop; dispid 2470;
  1810.     procedure RefreshMessageCount(Number: Integer); dispid 2471;
  1811.   end;
  1812.  
  1813. { NetManage POP Client Control }
  1814.  
  1815.   TPOPError = procedure(Sender: TObject; Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool) of object;
  1816.   TPOPTimeout = procedure(Sender: TObject; event: Smallint; var Continue: WordBool) of object;
  1817.   TPOPStateChanged = procedure(Sender: TObject; State: Smallint) of object;
  1818.   TPOPProtocolStateChanged = procedure(Sender: TObject; ProtocolState: Smallint) of object;
  1819.   TPOPBusy = procedure(Sender: TObject; isBusy: WordBool) of object;
  1820.   TPOPDocOutput = procedure(Sender: TObject; const DocOutput: DocOutput) of object;
  1821.   TPOPMessageSize = procedure(Sender: TObject; msgSize: Integer) of object;
  1822.   TPOPLast = procedure(Sender: TObject; Number: Integer) of object;
  1823.   TPOPRefreshMessageCount = procedure(Sender: TObject; Number: Integer) of object;
  1824.  
  1825.   TPOP = class(TOleControl)
  1826.   private
  1827.     FOnError: TPOPError;
  1828.     FOnTimeout: TPOPTimeout;
  1829.     FOnCancel: TNotifyEvent;
  1830.     FOnStateChanged: TPOPStateChanged;
  1831.     FOnProtocolStateChanged: TPOPProtocolStateChanged;
  1832.     FOnBusy: TPOPBusy;
  1833.     FOnLog: TNotifyEvent;
  1834.     FOnDocOutput: TPOPDocOutput;
  1835.     FOnMessageSize: TPOPMessageSize;
  1836.     FOnDelete: TNotifyEvent;
  1837.     FOnReset: TNotifyEvent;
  1838.     FOnLast: TPOPLast;
  1839.     FOnNoop: TNotifyEvent;
  1840.     FOnRefreshMessageCount: TPOPRefreshMessageCount;
  1841.     FIntf: Ipopct;
  1842.     function Get_Timeout(event: Smallint): Integer;
  1843.     procedure Set_Timeout(event: Smallint; Value: Integer);
  1844.     procedure Set_EnableTimer(event: Smallint; Value: WordBool);
  1845.     function Get_Errors: icErrors;
  1846.     function Get_DocOutput: DocOutput;
  1847.   protected
  1848.     procedure InitControlData; override;
  1849.     procedure InitControlInterface(const Obj: IUnknown); override;
  1850.   public
  1851.     procedure AboutBox;
  1852.     procedure Cancel;
  1853.     procedure Connect(RemoteHost, RemotePort: OleVariant);
  1854.     procedure Authenticate(UserId, Password: OleVariant);
  1855.     procedure GetDoc(URL, Headers, OutputFile: OleVariant);
  1856.     procedure MessageSize(MessageNumber: Smallint);
  1857.     procedure RetrieveMessage(MessageNumber: Smallint);
  1858.     procedure Delete(MessageNumber: Smallint);
  1859.     procedure Reset;
  1860.     procedure Last;
  1861.     procedure Noop;
  1862.     procedure TopMessage(MessageNumber: Smallint);
  1863.     procedure Quit;
  1864.     procedure RefreshMessageCount;
  1865.     property ControlInterface: Ipopct read FIntf;
  1866.     property BlockResult: Smallint index 519 read GetSmallintProp;
  1867.     property State: Smallint index 503 read GetSmallintProp;
  1868.     property ProtocolState: Smallint index 504 read GetSmallintProp;
  1869.     property ReplyString: WideString index 505 read GetWideStringProp;
  1870.     property ReplyCode: Integer index 506 read GetIntegerProp;
  1871.     property Timeout[event: Smallint]: Integer read Get_Timeout write Set_Timeout;
  1872.     property EnableTimer[event: Smallint]: WordBool write Set_EnableTimer;
  1873.     property Errors: icErrors read Get_Errors;
  1874.     property Busy: WordBool index 509 read GetWordBoolProp;
  1875.     property StateString: WideString index 511 read GetWideStringProp;
  1876.     property ProtocolStateString: WideString index 512 read GetWideStringProp;
  1877.     property SocketHandle: Integer index 518 read GetIntegerProp;
  1878.     property DocOutput: DocOutput read Get_DocOutput;
  1879.     property TopSupported: WordBool index 2452 read GetWordBoolProp;
  1880.     property MessageCount: Smallint index 2454 read GetSmallintProp;
  1881.   published
  1882.     property Blocking: WordBool index 515 read GetWordBoolProp write SetWordBoolProp stored False;
  1883.     property SleepTime: Integer index 516 read GetIntegerProp write SetIntegerProp stored False;
  1884.     property RemoteHost: WideString index 0 read GetWideStringProp write SetWideStringProp stored False;
  1885.     property RemotePort: Integer index 502 read GetIntegerProp write SetIntegerProp stored False;
  1886.     property NotificationMode: Smallint index 510 read GetSmallintProp write SetSmallintProp stored False;
  1887.     property Logging: WordBool index 514 read GetWordBoolProp write SetWordBoolProp stored False;
  1888.     property LocalPort: Integer index 517 read GetIntegerProp write SetIntegerProp stored False;
  1889.     property UserId: WideString index 601 read GetWideStringProp write SetWideStringProp stored False;
  1890.     property Password: WideString index 602 read GetWideStringProp write SetWideStringProp stored False;
  1891.     property URL: WideString index 1001 read GetWideStringProp write SetWideStringProp stored False;
  1892.     property TopLines: Integer index 2453 read GetIntegerProp write SetIntegerProp stored False;
  1893.     property OnError: TPOPError read FOnError write FOnError;
  1894.     property OnTimeout: TPOPTimeout read FOnTimeout write FOnTimeout;
  1895.     property OnCancel: TNotifyEvent read FOnCancel write FOnCancel;
  1896.     property OnStateChanged: TPOPStateChanged read FOnStateChanged write FOnStateChanged;
  1897.     property OnProtocolStateChanged: TPOPProtocolStateChanged read FOnProtocolStateChanged write FOnProtocolStateChanged;
  1898.     property OnBusy: TPOPBusy read FOnBusy write FOnBusy;
  1899.     property OnLog: TNotifyEvent read FOnLog write FOnLog;
  1900.     property OnDocOutput: TPOPDocOutput read FOnDocOutput write FOnDocOutput;
  1901.     property OnMessageSize: TPOPMessageSize read FOnMessageSize write FOnMessageSize;
  1902.     property OnDelete: TNotifyEvent read FOnDelete write FOnDelete;
  1903.     property OnReset: TNotifyEvent read FOnReset write FOnReset;
  1904.     property OnLast: TPOPLast read FOnLast write FOnLast;
  1905.     property OnNoop: TNotifyEvent read FOnNoop write FOnNoop;
  1906.     property OnRefreshMessageCount: TPOPRefreshMessageCount read FOnRefreshMessageCount write FOnRefreshMessageCount;
  1907.   end;
  1908.  
  1909. const
  1910.   LIBID_NNTPCTLib: TGUID = '{B7FC3564-8CE7-11CF-9754-00AA00C00908}';
  1911.  
  1912. { NNTPProtocolStateConstants }
  1913.  
  1914.   nntpBase = 0;
  1915.   nntpTransaction = 1;
  1916.  
  1917. { Component class GUIDs }
  1918.   Class_NNTP: TGUID = '{B7FC3568-8CE7-11CF-9754-00AA00C00908}';
  1919.  
  1920. type
  1921.  
  1922. { Forward declarations }
  1923. { Forward declarations: Interfaces }
  1924.   Inntpct = interface;
  1925.   InntpctDisp = dispinterface;
  1926.   DnntpctEvents = dispinterface;
  1927.  
  1928. { Forward declarations: CoClasses }
  1929.   NNTP = Inntpct;
  1930.  
  1931. { Forward declarations: Enums }
  1932.   NNTPProtocolStateConstants = TOleEnum;
  1933.  
  1934. { Properties/Methods for NetManage NNTP Client Control }
  1935.  
  1936.   Inntpct = interface(INMOleClientControl)
  1937.     ['{B7FC3566-8CE7-11CF-9754-00AA00C00908}']
  1938.     function Get_URL: WideString; safecall;
  1939.     procedure Set_URL(const Value: WideString); safecall;
  1940.     function Get_DocInput: DocInput; safecall;
  1941.     function Get_DocOutput: DocOutput; safecall;
  1942.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant); safecall;
  1943.     procedure GetDoc(URL, Headers, OutputFile: OleVariant); safecall;
  1944.     function Get_ArticleNumbersSupported: WordBool; safecall;
  1945.     function Get_OverviewSupported: WordBool; safecall;
  1946.     function Get_PostingAllowed: WordBool; safecall;
  1947.     function Get_LastUpdate: TDateTime; safecall;
  1948.     procedure Set_LastUpdate(Value: TDateTime); safecall;
  1949.     procedure GetAdministrationFile(LastUpdate: OleVariant); safecall;
  1950.     procedure SelectGroup(const groupName: WideString); safecall;
  1951.     procedure SetNextArticle; safecall;
  1952.     procedure SetLastArticle; safecall;
  1953.     procedure GetArticleNumbers(groupName: OleVariant); safecall;
  1954.     procedure GetArticleHeaders(const header: WideString; firstArticle, lastArticle: OleVariant); safecall;
  1955.     procedure GetArticleByArticleNumber(articleNumber: OleVariant); safecall;
  1956.     procedure GetArticleByMessageID(const messageID: WideString); safecall;
  1957.     procedure GetHeaderByArticleNumber(articleNumber: OleVariant); safecall;
  1958.     procedure GetHeaderByMessageID(const messageID: WideString); safecall;
  1959.     procedure GetBodyByArticleNumber(articleNumber: OleVariant); safecall;
  1960.     procedure GetBodyByMessageID(const messageID: WideString); safecall;
  1961.     procedure GetStatByArticleNumber(articleNumber: OleVariant); safecall;
  1962.     procedure GetOverviewFormat; safecall;
  1963.     procedure GetOverview(firstArticle, lastArticle: OleVariant); safecall;
  1964.     procedure ListGroups; safecall;
  1965.     procedure ListGroupDescriptions; safecall;
  1966.     procedure ListNewGroups(LastUpdate: OleVariant); safecall;
  1967.     procedure Quit; safecall;
  1968.     property URL: WideString read Get_URL write Set_URL;
  1969.     property DocInput: DocInput read Get_DocInput;
  1970.     property DocOutput: DocOutput read Get_DocOutput;
  1971.     property ArticleNumbersSupported: WordBool read Get_ArticleNumbersSupported;
  1972.     property OverviewSupported: WordBool read Get_OverviewSupported;
  1973.     property PostingAllowed: WordBool read Get_PostingAllowed;
  1974.     property LastUpdate: TDateTime read Get_LastUpdate write Set_LastUpdate;
  1975.   end;
  1976.  
  1977. { DispInterface declaration for Dual Interface Inntpct }
  1978.  
  1979.   InntpctDisp = dispinterface
  1980.     ['{B7FC3566-8CE7-11CF-9754-00AA00C00908}']
  1981.     property URL: WideString dispid 1001;
  1982.     property DocInput: DocInput readonly dispid 1002;
  1983.     property DocOutput: DocOutput readonly dispid 1003;
  1984.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant); dispid 1005;
  1985.     procedure GetDoc(URL, Headers, OutputFile: OleVariant); dispid 1004;
  1986.     property ArticleNumbersSupported: WordBool readonly dispid 1;
  1987.     property OverviewSupported: WordBool readonly dispid 2;
  1988.     property PostingAllowed: WordBool readonly dispid 3;
  1989.     property LastUpdate: TDateTime dispid 4;
  1990.     procedure GetAdministrationFile(LastUpdate: OleVariant); dispid 5;
  1991.     procedure SelectGroup(const groupName: WideString); dispid 6;
  1992.     procedure SetNextArticle; dispid 7;
  1993.     procedure SetLastArticle; dispid 8;
  1994.     procedure GetArticleNumbers(groupName: OleVariant); dispid 9;
  1995.     procedure GetArticleHeaders(const header: WideString; firstArticle, lastArticle: OleVariant); dispid 10;
  1996.     procedure GetArticleByArticleNumber(articleNumber: OleVariant); dispid 11;
  1997.     procedure GetArticleByMessageID(const messageID: WideString); dispid 12;
  1998.     procedure GetHeaderByArticleNumber(articleNumber: OleVariant); dispid 13;
  1999.     procedure GetHeaderByMessageID(const messageID: WideString); dispid 14;
  2000.     procedure GetBodyByArticleNumber(articleNumber: OleVariant); dispid 15;
  2001.     procedure GetBodyByMessageID(const messageID: WideString); dispid 16;
  2002.     procedure GetStatByArticleNumber(articleNumber: OleVariant); dispid 17;
  2003.     procedure GetOverviewFormat; dispid 18;
  2004.     procedure GetOverview(firstArticle, lastArticle: OleVariant); dispid 19;
  2005.     procedure ListGroups; dispid 20;
  2006.     procedure ListGroupDescriptions; dispid 21;
  2007.     procedure ListNewGroups(LastUpdate: OleVariant); dispid 22;
  2008.     procedure Quit; dispid 24;
  2009.   end;
  2010.  
  2011. { Event interface for NetManage NNTP Client Control }
  2012.  
  2013.   DnntpctEvents = dispinterface
  2014.     ['{B7FC3567-8CE7-11CF-9754-00AA00C00908}']
  2015.     procedure Error(Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool); dispid -608;
  2016.     procedure Timeout(event: Smallint; var Continue: WordBool); dispid 551;
  2017.     procedure Cancel; dispid 552;
  2018.     procedure StateChanged(State: Smallint); dispid 553;
  2019.     procedure ProtocolStateChanged(ProtocolState: Smallint); dispid 554;
  2020.     procedure Busy(isBusy: WordBool); dispid 555;
  2021.     procedure Log; dispid 556;
  2022.     procedure DocInput(const DocInput: DocInput); dispid 1016;
  2023.     procedure DocOutput(const DocOutput: DocOutput); dispid 1017;
  2024.     procedure AuthenticateRequest(var UserId, Password: WideString); dispid 0;
  2025.     procedure AuthenticateResponse(Authenticated: WordBool); dispid 1;
  2026.     procedure Banner(const Banner: WideString); dispid 2;
  2027.     procedure SelectGroup(const groupName: WideString; firstMessage, lastMessage, msgCount: Integer); dispid 3;
  2028.     procedure NextArticle(articleNumber: Integer; const messageID: WideString); dispid 4;
  2029.     procedure lastArticle(articleNumber: Integer; const messageID: WideString); dispid 5;
  2030.     procedure ArticleStatus(articleNumber: Integer; const messageID: WideString); dispid 6;
  2031.   end;
  2032.  
  2033. { NetManage NNTP Client Control }
  2034.  
  2035.   TNNTPError = procedure(Sender: TObject; Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool) of object;
  2036.   TNNTPTimeout = procedure(Sender: TObject; event: Smallint; var Continue: WordBool) of object;
  2037.   TNNTPStateChanged = procedure(Sender: TObject; State: Smallint) of object;
  2038.   TNNTPProtocolStateChanged = procedure(Sender: TObject; ProtocolState: Smallint) of object;
  2039.   TNNTPBusy = procedure(Sender: TObject; isBusy: WordBool) of object;
  2040.   TNNTPDocInput = procedure(Sender: TObject; const DocInput: DocInput) of object;
  2041.   TNNTPDocOutput = procedure(Sender: TObject; const DocOutput: DocOutput) of object;
  2042.   TNNTPAuthenticateRequest = procedure(Sender: TObject; var UserId, Password: WideString) of object;
  2043.   TNNTPAuthenticateResponse = procedure(Sender: TObject; Authenticated: WordBool) of object;
  2044.   TNNTPBanner = procedure(Sender: TObject; const Banner: WideString) of object;
  2045.   TNNTPSelectGroup = procedure(Sender: TObject; const groupName: WideString; firstMessage, lastMessage, msgCount: Integer) of object;
  2046.   TNNTPNextArticle = procedure(Sender: TObject; articleNumber: Integer; const messageID: WideString) of object;
  2047.   TNNTPlastArticle = procedure(Sender: TObject; articleNumber: Integer; const messageID: WideString) of object;
  2048.   TNNTPArticleStatus = procedure(Sender: TObject; articleNumber: Integer; const messageID: WideString) of object;
  2049.  
  2050.   TNNTP = class(TOleControl)
  2051.   private
  2052.     FOnError: TNNTPError;
  2053.     FOnTimeout: TNNTPTimeout;
  2054.     FOnCancel: TNotifyEvent;
  2055.     FOnStateChanged: TNNTPStateChanged;
  2056.     FOnProtocolStateChanged: TNNTPProtocolStateChanged;
  2057.     FOnBusy: TNNTPBusy;
  2058.     FOnLog: TNotifyEvent;
  2059.     FOnDocInput: TNNTPDocInput;
  2060.     FOnDocOutput: TNNTPDocOutput;
  2061.     FOnAuthenticateRequest: TNNTPAuthenticateRequest;
  2062.     FOnAuthenticateResponse: TNNTPAuthenticateResponse;
  2063.     FOnBanner: TNNTPBanner;
  2064.     FOnSelectGroup: TNNTPSelectGroup;
  2065.     FOnNextArticle: TNNTPNextArticle;
  2066.     FOnlastArticle: TNNTPlastArticle;
  2067.     FOnArticleStatus: TNNTPArticleStatus;
  2068.     FIntf: Inntpct;
  2069.     function Get_Timeout(event: Smallint): Integer;
  2070.     procedure Set_Timeout(event: Smallint; Value: Integer);
  2071.     procedure Set_EnableTimer(event: Smallint; Value: WordBool);
  2072.     function Get_Errors: icErrors;
  2073.     function Get_DocInput: DocInput;
  2074.     function Get_DocOutput: DocOutput;
  2075.   protected
  2076.     procedure InitControlData; override;
  2077.     procedure InitControlInterface(const Obj: IUnknown); override;
  2078.   public
  2079.     procedure AboutBox;
  2080.     procedure Cancel;
  2081.     procedure Connect(RemoteHost, RemotePort: OleVariant);
  2082.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant);
  2083.     procedure GetDoc(URL, Headers, OutputFile: OleVariant);
  2084.     procedure GetAdministrationFile(LastUpdate: OleVariant);
  2085.     procedure SelectGroup(const groupName: WideString);
  2086.     procedure SetNextArticle;
  2087.     procedure SetLastArticle;
  2088.     procedure GetArticleNumbers(groupName: OleVariant);
  2089.     procedure GetArticleHeaders(const header: WideString; firstArticle, lastArticle: OleVariant);
  2090.     procedure GetArticleByArticleNumber(articleNumber: OleVariant);
  2091.     procedure GetArticleByMessageID(const messageID: WideString);
  2092.     procedure GetHeaderByArticleNumber(articleNumber: OleVariant);
  2093.     procedure GetHeaderByMessageID(const messageID: WideString);
  2094.     procedure GetBodyByArticleNumber(articleNumber: OleVariant);
  2095.     procedure GetBodyByMessageID(const messageID: WideString);
  2096.     procedure GetStatByArticleNumber(articleNumber: OleVariant);
  2097.     procedure GetOverviewFormat;
  2098.     procedure GetOverview(firstArticle, lastArticle: OleVariant);
  2099.     procedure ListGroups;
  2100.     procedure ListGroupDescriptions;
  2101.     procedure ListNewGroups(LastUpdate: OleVariant);
  2102.     procedure Quit;
  2103.     property ControlInterface: Inntpct read FIntf;
  2104.     property BlockResult: Smallint index 519 read GetSmallintProp;
  2105.     property State: Smallint index 503 read GetSmallintProp;
  2106.     property ProtocolState: Smallint index 504 read GetSmallintProp;
  2107.     property ReplyString: WideString index 505 read GetWideStringProp;
  2108.     property ReplyCode: Integer index 506 read GetIntegerProp;
  2109.     property Timeout[event: Smallint]: Integer read Get_Timeout write Set_Timeout;
  2110.     property EnableTimer[event: Smallint]: WordBool write Set_EnableTimer;
  2111.     property Errors: icErrors read Get_Errors;
  2112.     property Busy: WordBool index 509 read GetWordBoolProp;
  2113.     property StateString: WideString index 511 read GetWideStringProp;
  2114.     property ProtocolStateString: WideString index 512 read GetWideStringProp;
  2115.     property SocketHandle: Integer index 518 read GetIntegerProp;
  2116.     property DocInput: DocInput read Get_DocInput;
  2117.     property DocOutput: DocOutput read Get_DocOutput;
  2118.     property ArticleNumbersSupported: WordBool index 1 read GetWordBoolProp;
  2119.     property OverviewSupported: WordBool index 2 read GetWordBoolProp;
  2120.     property PostingAllowed: WordBool index 3 read GetWordBoolProp;
  2121.   published
  2122.     property Blocking: WordBool index 515 read GetWordBoolProp write SetWordBoolProp stored False;
  2123.     property SleepTime: Integer index 516 read GetIntegerProp write SetIntegerProp stored False;
  2124.     property RemoteHost: WideString index 0 read GetWideStringProp write SetWideStringProp stored False;
  2125.     property RemotePort: Integer index 502 read GetIntegerProp write SetIntegerProp stored False;
  2126.     property NotificationMode: Smallint index 510 read GetSmallintProp write SetSmallintProp stored False;
  2127.     property Logging: WordBool index 514 read GetWordBoolProp write SetWordBoolProp stored False;
  2128.     property LocalPort: Integer index 517 read GetIntegerProp write SetIntegerProp stored False;
  2129.     property URL: WideString index 1001 read GetWideStringProp write SetWideStringProp stored False;
  2130.     property LastUpdate: TDateTime index 4 read GetTDateTimeProp write SetTDateTimeProp stored False;
  2131.     property OnError: TNNTPError read FOnError write FOnError;
  2132.     property OnTimeout: TNNTPTimeout read FOnTimeout write FOnTimeout;
  2133.     property OnCancel: TNotifyEvent read FOnCancel write FOnCancel;
  2134.     property OnStateChanged: TNNTPStateChanged read FOnStateChanged write FOnStateChanged;
  2135.     property OnProtocolStateChanged: TNNTPProtocolStateChanged read FOnProtocolStateChanged write FOnProtocolStateChanged;
  2136.     property OnBusy: TNNTPBusy read FOnBusy write FOnBusy;
  2137.     property OnLog: TNotifyEvent read FOnLog write FOnLog;
  2138.     property OnDocInput: TNNTPDocInput read FOnDocInput write FOnDocInput;
  2139.     property OnDocOutput: TNNTPDocOutput read FOnDocOutput write FOnDocOutput;
  2140.     property OnAuthenticateRequest: TNNTPAuthenticateRequest read FOnAuthenticateRequest write FOnAuthenticateRequest;
  2141.     property OnAuthenticateResponse: TNNTPAuthenticateResponse read FOnAuthenticateResponse write FOnAuthenticateResponse;
  2142.     property OnBanner: TNNTPBanner read FOnBanner write FOnBanner;
  2143.     property OnSelectGroup: TNNTPSelectGroup read FOnSelectGroup write FOnSelectGroup;
  2144.     property OnNextArticle: TNNTPNextArticle read FOnNextArticle write FOnNextArticle;
  2145.     property OnlastArticle: TNNTPlastArticle read FOnlastArticle write FOnlastArticle;
  2146.     property OnArticleStatus: TNNTPArticleStatus read FOnArticleStatus write FOnArticleStatus;
  2147.   end;
  2148.  
  2149. const
  2150.   LIBID_SMTPCTLib: TGUID = '{B7FC3570-8CE7-11CF-9754-00AA00C00908}';
  2151.  
  2152. { SMTPProtocolStateConstants }
  2153.  
  2154.   smtpBase = 0;
  2155.   smtpTransaction = 1;
  2156.  
  2157. const
  2158.  
  2159. { Component class GUIDs }
  2160.   Class_SMTP: TGUID = '{B7FC3573-8CE7-11CF-9754-00AA00C00908}';
  2161.  
  2162. type
  2163.  
  2164. { Forward declarations }
  2165. { Forward declarations: Interfaces }
  2166.   Ismtpct = interface;
  2167.   IsmtpctDisp = dispinterface;
  2168.   DsmtpctEvents = dispinterface;
  2169.  
  2170. { Forward declarations: CoClasses }
  2171.   SMTP = Ismtpct;
  2172.  
  2173. { Forward declarations: Enums }
  2174.   SMTPProtocolStateConstants = TOleEnum;
  2175.  
  2176. { Properties/Methods for NetManage SMTP Client Control }
  2177.  
  2178.   Ismtpct = interface(INMOleClientControl)
  2179.     ['{B7FC3571-8CE7-11CF-9754-00AA00C00908}']
  2180.     function Get_URL: WideString; safecall;
  2181.     procedure Set_URL(const Value: WideString); safecall;
  2182.     function Get_DocInput: DocInput; safecall;
  2183.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant); safecall;
  2184.     procedure Reset; safecall;
  2185.     procedure Verify(const name: WideString); safecall;
  2186.     procedure Expand(const name: WideString); safecall;
  2187.     procedure Help(helpTopic: OleVariant); safecall;
  2188.     procedure Noop; safecall;
  2189.     procedure Quit; safecall;
  2190.     property URL: WideString read Get_URL write Set_URL;
  2191.     property DocInput: DocInput read Get_DocInput;
  2192.   end;
  2193.  
  2194. { DispInterface declaration for Dual Interface Ismtpct }
  2195.  
  2196.   IsmtpctDisp = dispinterface
  2197.     ['{B7FC3571-8CE7-11CF-9754-00AA00C00908}']
  2198.     property URL: WideString dispid 1001;
  2199.     property DocInput: DocInput readonly dispid 1002;
  2200.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant); dispid 1005;
  2201.     procedure Reset; dispid 200;
  2202.     procedure Verify(const name: WideString); dispid 201;
  2203.     procedure Expand(const name: WideString); dispid 202;
  2204.     procedure Help(helpTopic: OleVariant); dispid 203;
  2205.     procedure Noop; dispid 204;
  2206.     procedure Quit; dispid 205;
  2207.   end;
  2208.  
  2209. { Event interface for NetManage SMTP Client Control }
  2210.  
  2211.   DsmtpctEvents = dispinterface
  2212.     ['{B7FC3572-8CE7-11CF-9754-00AA00C00908}']
  2213.     procedure Error(Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool); dispid -608;
  2214.     procedure Timeout(event: Smallint; var Continue: WordBool); dispid 551;
  2215.     procedure Cancel; dispid 552;
  2216.     procedure StateChanged(State: Smallint); dispid 553;
  2217.     procedure ProtocolStateChanged(ProtocolState: Smallint); dispid 554;
  2218.     procedure Busy(isBusy: WordBool); dispid 555;
  2219.     procedure Log; dispid 556;
  2220.     procedure DocInput(const DocInput: DocInput); dispid 1016;
  2221.     procedure Reset; dispid 300;
  2222.     procedure Verify; dispid 301;
  2223.     procedure Expand; dispid 302;
  2224.     procedure Help; dispid 303;
  2225.     procedure Noop; dispid 304;
  2226.   end;
  2227.  
  2228. { NetManage SMTP Client Control }
  2229.  
  2230.   TSMTPError = procedure(Sender: TObject; Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool) of object;
  2231.   TSMTPTimeout = procedure(Sender: TObject; event: Smallint; var Continue: WordBool) of object;
  2232.   TSMTPStateChanged = procedure(Sender: TObject; State: Smallint) of object;
  2233.   TSMTPProtocolStateChanged = procedure(Sender: TObject; ProtocolState: Smallint) of object;
  2234.   TSMTPBusy = procedure(Sender: TObject; isBusy: WordBool) of object;
  2235.   TSMTPDocInput = procedure(Sender: TObject; const DocInput: DocInput) of object;
  2236.  
  2237.   TSMTP = class(TOleControl)
  2238.   private
  2239.     FOnError: TSMTPError;
  2240.     FOnTimeout: TSMTPTimeout;
  2241.     FOnCancel: TNotifyEvent;
  2242.     FOnStateChanged: TSMTPStateChanged;
  2243.     FOnProtocolStateChanged: TSMTPProtocolStateChanged;
  2244.     FOnBusy: TSMTPBusy;
  2245.     FOnLog: TNotifyEvent;
  2246.     FOnDocInput: TSMTPDocInput;
  2247.     FOnReset: TNotifyEvent;
  2248.     FOnVerify: TNotifyEvent;
  2249.     FOnExpand: TNotifyEvent;
  2250.     FOnHelp: TNotifyEvent;
  2251.     FOnNoop: TNotifyEvent;
  2252.     FIntf: Ismtpct;
  2253.     function Get_Timeout(event: Smallint): Integer;
  2254.     procedure Set_Timeout(event: Smallint; Value: Integer);
  2255.     procedure Set_EnableTimer(event: Smallint; Value: WordBool);
  2256.     function Get_Errors: icErrors;
  2257.     function Get_DocInput: DocInput;
  2258.   protected
  2259.     procedure InitControlData; override;
  2260.     procedure InitControlInterface(const Obj: IUnknown); override;
  2261.   public
  2262.     procedure AboutBox;
  2263.     procedure Cancel;
  2264.     procedure Connect(RemoteHost, RemotePort: OleVariant);
  2265.     procedure SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant);
  2266.     procedure Reset;
  2267.     procedure Verify(const name: WideString);
  2268.     procedure Expand(const name: WideString);
  2269.     procedure Help(helpTopic: OleVariant);
  2270.     procedure Noop;
  2271.     procedure Quit;
  2272.     property ControlInterface: Ismtpct read FIntf;
  2273.     property BlockResult: Smallint index 519 read GetSmallintProp;
  2274.     property State: Smallint index 503 read GetSmallintProp;
  2275.     property ProtocolState: Smallint index 504 read GetSmallintProp;
  2276.     property ReplyString: WideString index 505 read GetWideStringProp;
  2277.     property ReplyCode: Integer index 506 read GetIntegerProp;
  2278.     property Timeout[event: Smallint]: Integer read Get_Timeout write Set_Timeout;
  2279.     property EnableTimer[event: Smallint]: WordBool write Set_EnableTimer;
  2280.     property Errors: icErrors read Get_Errors;
  2281.     property Busy: WordBool index 509 read GetWordBoolProp;
  2282.     property StateString: WideString index 511 read GetWideStringProp;
  2283.     property ProtocolStateString: WideString index 512 read GetWideStringProp;
  2284.     property SocketHandle: Integer index 518 read GetIntegerProp;
  2285.     property DocInput: DocInput read Get_DocInput;
  2286.   published
  2287.     property Blocking: WordBool index 515 read GetWordBoolProp write SetWordBoolProp stored False;
  2288.     property SleepTime: Integer index 516 read GetIntegerProp write SetIntegerProp stored False;
  2289.     property RemoteHost: WideString index 0 read GetWideStringProp write SetWideStringProp stored False;
  2290.     property RemotePort: Integer index 502 read GetIntegerProp write SetIntegerProp stored False;
  2291.     property NotificationMode: Smallint index 510 read GetSmallintProp write SetSmallintProp stored False;
  2292.     property Logging: WordBool index 514 read GetWordBoolProp write SetWordBoolProp stored False;
  2293.     property LocalPort: Integer index 517 read GetIntegerProp write SetIntegerProp stored False;
  2294.     property URL: WideString index 1001 read GetWideStringProp write SetWideStringProp stored False;
  2295.     property OnError: TSMTPError read FOnError write FOnError;
  2296.     property OnTimeout: TSMTPTimeout read FOnTimeout write FOnTimeout;
  2297.     property OnCancel: TNotifyEvent read FOnCancel write FOnCancel;
  2298.     property OnStateChanged: TSMTPStateChanged read FOnStateChanged write FOnStateChanged;
  2299.     property OnProtocolStateChanged: TSMTPProtocolStateChanged read FOnProtocolStateChanged write FOnProtocolStateChanged;
  2300.     property OnBusy: TSMTPBusy read FOnBusy write FOnBusy;
  2301.     property OnLog: TNotifyEvent read FOnLog write FOnLog;
  2302.     property OnDocInput: TSMTPDocInput read FOnDocInput write FOnDocInput;
  2303.     property OnReset: TNotifyEvent read FOnReset write FOnReset;
  2304.     property OnVerify: TNotifyEvent read FOnVerify write FOnVerify;
  2305.     property OnExpand: TNotifyEvent read FOnExpand write FOnExpand;
  2306.     property OnHelp: TNotifyEvent read FOnHelp write FOnHelp;
  2307.     property OnNoop: TNotifyEvent read FOnNoop write FOnNoop;
  2308.   end;
  2309.  
  2310. const
  2311.   LIBID_WINSOCKLib: TGUID = '{B7FC3580-8CE7-11CF-9754-00AA00C00908}';
  2312.  
  2313. { SCKSTATEConstants }
  2314.  
  2315.   sckClosed = 0;
  2316.   sckOpen = 1;
  2317.   sckListening = 2;
  2318.   sckConnectionPending = 3;
  2319.   sckResolvingHost = 4;
  2320.   sckHostResolved = 5;
  2321.   sckConnecting = 6;
  2322.   sckConnected = 7;
  2323.   sckClosing = 8;
  2324.   sckError = 9;
  2325.  
  2326. const
  2327.  
  2328. { Component class GUIDs }
  2329.   Class_TCP: TGUID = '{B7FC3584-8CE7-11CF-9754-00AA00C00908}';
  2330.   Class_UDP: TGUID = '{B7FC3587-8CE7-11CF-9754-00AA00C00908}';
  2331.  
  2332. type
  2333.  
  2334. { Forward declarations }
  2335. { Forward declarations: Interfaces }
  2336.   INMWinsockControl = interface;
  2337.   INMWinsockControlDisp = dispinterface;
  2338.   DNMWinsockControlEvents = dispinterface;
  2339.   ITCP = interface;
  2340.   ITCPDisp = dispinterface;
  2341.   DTCPEvents = dispinterface;
  2342.   IUDP = interface;
  2343.   IUDPDisp = dispinterface;
  2344.   DUDPEvents = dispinterface;
  2345.  
  2346. { Forward declarations: CoClasses }
  2347.   TCP = ITCP;
  2348.   UDP = IUDP;
  2349.  
  2350. { Forward declarations: Enums }
  2351.   SCKSTATEConstants = TOleEnum;
  2352.  
  2353. { NetManage Shared Winsock methods and events }
  2354.  
  2355.   INMWinsockControl = interface(IDispatch)
  2356.     ['{B7FC3574-8CE7-11CF-9754-00AA00C00908}']
  2357.     procedure AboutBox; safecall;
  2358.     function Get_RemoteHostIP: WideString; safecall;
  2359.     function Get_LocalHostName: WideString; safecall;
  2360.     function Get_LocalIP: WideString; safecall;
  2361.     function Get_SocketHandle: Integer; safecall;
  2362.     property RemoteHostIP: WideString read Get_RemoteHostIP;
  2363.     property LocalHostName: WideString read Get_LocalHostName;
  2364.     property LocalIP: WideString read Get_LocalIP;
  2365.     property SocketHandle: Integer read Get_SocketHandle;
  2366.   end;
  2367.  
  2368. { DispInterface declaration for Dual Interface INMWinsockControl }
  2369.  
  2370.   INMWinsockControlDisp = dispinterface
  2371.     ['{B7FC3574-8CE7-11CF-9754-00AA00C00908}']
  2372.     property RemoteHostIP: WideString readonly dispid 1001;
  2373.     property LocalHostName: WideString readonly dispid 1002;
  2374.     property LocalIP: WideString readonly dispid 1003;
  2375.     property SocketHandle: Integer readonly dispid 1004;
  2376.   end;
  2377.  
  2378. { Shared Winsock events }
  2379.  
  2380.   DNMWinsockControlEvents = dispinterface
  2381.     ['{B7FC3575-8CE7-11CF-9754-00AA00C00908}']
  2382.     procedure DataArrival(bytesTotal: Integer); dispid 1051;
  2383.   end;
  2384.  
  2385. { Properties and methods for NetManage TCP Control }
  2386.  
  2387.   ITCP = interface(INMWinsockControl)
  2388.     ['{B7FC3582-8CE7-11CF-9754-00AA00C00908}']
  2389.     function Get_RemoteHost: WideString; safecall;
  2390.     procedure Set_RemoteHost(const Value: WideString); safecall;
  2391.     function Get_RemotePort: Integer; safecall;
  2392.     procedure Set_RemotePort(Value: Integer); safecall;
  2393.     function Get_LocalPort: Integer; safecall;
  2394.     procedure Set_LocalPort(Value: Integer); safecall;
  2395.     function Get_State: Smallint; safecall;
  2396.     function Get_BytesReceived: Integer; safecall;
  2397.     procedure Connect(RemoteHost, RemotePort: OleVariant); safecall;
  2398.     procedure Listen; safecall;
  2399.     procedure Accept(requestID: Integer); safecall;
  2400.     procedure SendData(data: OleVariant); safecall;
  2401.     procedure GetData(var data: OleVariant; type_, maxLen: OleVariant); safecall;
  2402.     procedure PeekData(var data: OleVariant; type_, maxLen: OleVariant); safecall;
  2403.     procedure Close; safecall;
  2404.     property RemoteHost: WideString read Get_RemoteHost write Set_RemoteHost;
  2405.     property RemotePort: Integer read Get_RemotePort write Set_RemotePort;
  2406.     property LocalPort: Integer read Get_LocalPort write Set_LocalPort;
  2407.     property State: Smallint read Get_State;
  2408.     property BytesReceived: Integer read Get_BytesReceived;
  2409.   end;
  2410.  
  2411. { DispInterface declaration for Dual Interface ITCP }
  2412.  
  2413.   ITCPDisp = dispinterface
  2414.     ['{B7FC3582-8CE7-11CF-9754-00AA00C00908}']
  2415.     property RemoteHost: WideString dispid 0;
  2416.     property RemotePort: Integer dispid 502;
  2417.     property LocalPort: Integer dispid 1010;
  2418.     property State: Smallint readonly dispid 503;
  2419.     property BytesReceived: Integer readonly dispid 1101;
  2420.     procedure Connect(RemoteHost, RemotePort: OleVariant); dispid 521;
  2421.     procedure Listen; dispid 1102;
  2422.     procedure Accept(requestID: Integer); dispid 1103;
  2423.     procedure SendData(data: OleVariant); dispid 1012;
  2424.     procedure GetData(var data: OleVariant; type_, maxLen: OleVariant); dispid 1011;
  2425.     procedure PeekData(var data: OleVariant; type_, maxLen: OleVariant); dispid 1104;
  2426.     procedure Close; dispid 1105;
  2427.   end;
  2428.  
  2429. { NetManage TCP Control events }
  2430.  
  2431.   DTCPEvents = dispinterface
  2432.     ['{B7FC3583-8CE7-11CF-9754-00AA00C00908}']
  2433.     procedure Error(Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool); dispid -608;
  2434.     procedure DataArrival(bytesTotal: Integer); dispid 1051;
  2435.     procedure Connect; dispid 1151;
  2436.     procedure ConnectionRequest(requestID: Integer); dispid 1152;
  2437.     procedure Close; dispid 1155;
  2438.     procedure SendProgress(bytesSent, bytesRemaining: Integer); dispid 1153;
  2439.     procedure SendComplete; dispid 1154;
  2440.   end;
  2441.  
  2442. { Properties and methods for the NetManage UDP Control }
  2443.  
  2444.   IUDP = interface(INMWinsockControl)
  2445.     ['{B7FC3585-8CE7-11CF-9754-00AA00C00908}']
  2446.     function Get_RemoteHost: WideString; safecall;
  2447.     procedure Set_RemoteHost(const Value: WideString); safecall;
  2448.     function Get_RemotePort: Integer; safecall;
  2449.     procedure Set_RemotePort(Value: Integer); safecall;
  2450.     function Get_LocalPort: Integer; safecall;
  2451.     procedure Set_LocalPort(Value: Integer); safecall;
  2452.     procedure SendData(data: OleVariant); safecall;
  2453.     procedure GetData(var data: OleVariant; type_: OleVariant); safecall;
  2454.     property RemoteHost: WideString read Get_RemoteHost write Set_RemoteHost;
  2455.     property RemotePort: Integer read Get_RemotePort write Set_RemotePort;
  2456.     property LocalPort: Integer read Get_LocalPort write Set_LocalPort;
  2457.   end;
  2458.  
  2459. { DispInterface declaration for Dual Interface IUDP }
  2460.  
  2461.   IUDPDisp = dispinterface
  2462.     ['{B7FC3585-8CE7-11CF-9754-00AA00C00908}']
  2463.     property RemoteHost: WideString dispid 0;
  2464.     property RemotePort: Integer dispid 502;
  2465.     property LocalPort: Integer dispid 1010;
  2466.     procedure SendData(data: OleVariant); dispid 1012;
  2467.     procedure GetData(var data: OleVariant; type_: OleVariant); dispid 1011;
  2468.   end;
  2469.  
  2470. { NetManage UDP Control events }
  2471.  
  2472.   DUDPEvents = dispinterface
  2473.     ['{B7FC3586-8CE7-11CF-9754-00AA00C00908}']
  2474.     procedure Error(Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool); dispid -608;
  2475.     procedure DataArrival(bytesTotal: Integer); dispid 1051;
  2476.   end;
  2477.  
  2478. { NetManage TCP Control }
  2479.  
  2480.   TTCPError = procedure(Sender: TObject; Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool) of object;
  2481.   TTCPDataArrival = procedure(Sender: TObject; bytesTotal: Integer) of object;
  2482.   TTCPConnectionRequest = procedure(Sender: TObject; requestID: Integer) of object;
  2483.   TTCPSendProgress = procedure(Sender: TObject; bytesSent, bytesRemaining: Integer) of object;
  2484.  
  2485.   TTCP = class(TOleControl)
  2486.   private
  2487.     FOnError: TTCPError;
  2488.     FOnDataArrival: TTCPDataArrival;
  2489.     FOnConnect: TNotifyEvent;
  2490.     FOnConnectionRequest: TTCPConnectionRequest;
  2491.     FOnClose: TNotifyEvent;
  2492.     FOnSendProgress: TTCPSendProgress;
  2493.     FOnSendComplete: TNotifyEvent;
  2494.     FIntf: ITCP;
  2495.   protected
  2496.     procedure InitControlData; override;
  2497.     procedure InitControlInterface(const Obj: IUnknown); override;
  2498.   public
  2499.     procedure AboutBox;
  2500.     procedure Connect(RemoteHost, RemotePort: OleVariant);
  2501.     procedure Listen;
  2502.     procedure Accept(requestID: Integer);
  2503.     procedure SendData(data: OleVariant);
  2504.     procedure GetData(var data: OleVariant; type_, maxLen: OleVariant);
  2505.     procedure PeekData(var data: OleVariant; type_, maxLen: OleVariant);
  2506.     procedure Close;
  2507.     property ControlInterface: ITCP read FIntf;
  2508.     property RemoteHostIP: WideString index 1001 read GetWideStringProp;
  2509.     property LocalHostName: WideString index 1002 read GetWideStringProp;
  2510.     property LocalIP: WideString index 1003 read GetWideStringProp;
  2511.     property SocketHandle: Integer index 1004 read GetIntegerProp;
  2512.     property State: Smallint index 503 read GetSmallintProp;
  2513.     property BytesReceived: Integer index 1101 read GetIntegerProp;
  2514.   published
  2515.     property RemoteHost: WideString index 0 read GetWideStringProp write SetWideStringProp stored False;
  2516.     property RemotePort: Integer index 502 read GetIntegerProp write SetIntegerProp stored False;
  2517.     property LocalPort: Integer index 1010 read GetIntegerProp write SetIntegerProp stored False;
  2518.     property OnError: TTCPError read FOnError write FOnError;
  2519.     property OnDataArrival: TTCPDataArrival read FOnDataArrival write FOnDataArrival;
  2520.     property OnConnect: TNotifyEvent read FOnConnect write FOnConnect;
  2521.     property OnConnectionRequest: TTCPConnectionRequest read FOnConnectionRequest write FOnConnectionRequest;
  2522.     property OnClose: TNotifyEvent read FOnClose write FOnClose;
  2523.     property OnSendProgress: TTCPSendProgress read FOnSendProgress write FOnSendProgress;
  2524.     property OnSendComplete: TNotifyEvent read FOnSendComplete write FOnSendComplete;
  2525.   end;
  2526.  
  2527. { NetManage UDP Control }
  2528.  
  2529.   TUDPError = procedure(Sender: TObject; Number: Smallint; var Description: WideString; Scode: Integer; const Source, HelpFile: WideString; HelpContext: Integer; var CancelDisplay: WordBool) of object;
  2530.   TUDPDataArrival = procedure(Sender: TObject; bytesTotal: Integer) of object;
  2531.  
  2532.   TUDP = class(TOleControl)
  2533.   private
  2534.     FOnError: TUDPError;
  2535.     FOnDataArrival: TUDPDataArrival;
  2536.     FIntf: IUDP;
  2537.   protected
  2538.     procedure InitControlData; override;
  2539.     procedure InitControlInterface(const Obj: IUnknown); override;
  2540.   public
  2541.     procedure AboutBox;
  2542.     procedure SendData(data: OleVariant);
  2543.     procedure GetData(var data: OleVariant; type_: OleVariant);
  2544.     property ControlInterface: IUDP read FIntf;
  2545.     property RemoteHostIP: WideString index 1001 read GetWideStringProp;
  2546.     property LocalHostName: WideString index 1002 read GetWideStringProp;
  2547.     property LocalIP: WideString index 1003 read GetWideStringProp;
  2548.     property SocketHandle: Integer index 1004 read GetIntegerProp;
  2549.   published
  2550.     property RemoteHost: WideString index 0 read GetWideStringProp write SetWideStringProp stored False;
  2551.     property RemotePort: Integer index 502 read GetIntegerProp write SetIntegerProp stored False;
  2552.     property LocalPort: Integer index 1010 read GetIntegerProp write SetIntegerProp stored False;
  2553.     property OnError: TUDPError read FOnError write FOnError;
  2554.     property OnDataArrival: TUDPDataArrival read FOnDataArrival write FOnDataArrival;
  2555.   end;
  2556.  
  2557.  
  2558. procedure Register;
  2559.  
  2560. implementation
  2561.  
  2562. uses ComObj;
  2563.  
  2564. class function CoDocHeaderCls.Create: DocHeader;
  2565. begin
  2566.   Result := CreateComObject(Class_DocHeaderCls) as DocHeader;
  2567. end;
  2568.  
  2569. class function CoDocHeaderCls.CreateRemote(const MachineName: string): DocHeader;
  2570. begin
  2571.   Result := CreateRemoteComObject(MachineName, Class_DocHeaderCls) as DocHeader;
  2572. end;
  2573.  
  2574. class function CoDocHeadersCls.Create: DocHeaders;
  2575. begin
  2576.   Result := CreateComObject(Class_DocHeadersCls) as DocHeaders;
  2577. end;
  2578.  
  2579. class function CoDocHeadersCls.CreateRemote(const MachineName: string): DocHeaders;
  2580. begin
  2581.   Result := CreateRemoteComObject(MachineName, Class_DocHeadersCls) as DocHeaders;
  2582. end;
  2583.  
  2584. class function CoDocInputCls.Create: DocInput;
  2585. begin
  2586.   Result := CreateComObject(Class_DocInputCls) as DocInput;
  2587. end;
  2588.  
  2589. class function CoDocInputCls.CreateRemote(const MachineName: string): DocInput;
  2590. begin
  2591.   Result := CreateRemoteComObject(MachineName, Class_DocInputCls) as DocInput;
  2592. end;
  2593.  
  2594. class function CoDocOutputCls.Create: DocOutput;
  2595. begin
  2596.   Result := CreateComObject(Class_DocOutputCls) as DocOutput;
  2597. end;
  2598.  
  2599. class function CoDocOutputCls.CreateRemote(const MachineName: string): DocOutput;
  2600. begin
  2601.   Result := CreateRemoteComObject(MachineName, Class_DocOutputCls) as DocOutput;
  2602. end;
  2603.  
  2604. class function CoicErrorCls.Create: icError;
  2605. begin
  2606.   Result := CreateComObject(Class_icErrorCls) as icError;
  2607. end;
  2608.  
  2609. class function CoicErrorCls.CreateRemote(const MachineName: string): icError;
  2610. begin
  2611.   Result := CreateRemoteComObject(MachineName, Class_icErrorCls) as icError;
  2612. end;
  2613.  
  2614. class function CoicErrorsCls.Create: icErrors;
  2615. begin
  2616.   Result := CreateComObject(Class_icErrorsCls) as icErrors;
  2617. end;
  2618.  
  2619. class function CoicErrorsCls.CreateRemote(const MachineName: string): icErrors;
  2620. begin
  2621.   Result := CreateRemoteComObject(MachineName, Class_icErrorsCls) as icErrors;
  2622. end;
  2623.  
  2624. class function CoFTPDirItemCls.Create: FTPDirItem;
  2625. begin
  2626.   Result := CreateComObject(Class_FTPDirItemCls) as FTPDirItem;
  2627. end;
  2628.  
  2629. class function CoFTPDirItemCls.CreateRemote(const MachineName: string): FTPDirItem;
  2630. begin
  2631.   Result := CreateRemoteComObject(MachineName, Class_FTPDirItemCls) as FTPDirItem;
  2632. end;
  2633.  
  2634. class function CoFirewall.Create: IFirewall;
  2635. begin
  2636.   Result := CreateComObject(Class_Firewall) as IFirewall;
  2637. end;
  2638.  
  2639. class function CoFirewall.CreateRemote(const MachineName: string): IFirewall;
  2640. begin
  2641.   Result := CreateRemoteComObject(MachineName, Class_Firewall) as IFirewall;
  2642. end;
  2643.  
  2644. procedure TFTP.InitControlData;
  2645. const
  2646.   CEventDispIDs: array[0..27] of Integer = (
  2647.     $FFFFFDA0, $00000227, $00000228, $00000229, $0000022A, $0000022B,
  2648.     $0000022C, $000003F8, $000003F9, $0000002B, $0000002C, $0000002D,
  2649.     $0000002F, $00000030, $00000031, $00000036, $00000037, $00000038,
  2650.     $00000039, $0000003A, $0000003C, $0000003E, $0000003F, $00000040,
  2651.     $00000042, $00000044, $00000043, $0000005A);
  2652.   CLicenseKey: array[0..36] of Word = (
  2653.     $0037, $0033, $0066, $0036, $0061, $0062, $0033, $0030, $002D, $0035,
  2654.     $0035, $0039, $0038, $002D, $0031, $0031, $0063, $0066, $002D, $0038,
  2655.     $0033, $0038, $0039, $002D, $0030, $0030, $0032, $0030, $0061, $0066,
  2656.     $0036, $0039, $0037, $0030, $0031, $0034, $0000);
  2657.   CControlData: TControlData = (
  2658.     ClassID: '{B7FC354C-8CE7-11CF-9754-00AA00C00908}';
  2659.     EventIID: '{B7FC354B-8CE7-11CF-9754-00AA00C00908}';
  2660.     EventCount: 28;
  2661.     EventDispIDs: @CEventDispIDs;
  2662.     LicenseKey: @CLicenseKey;
  2663.     Flags: $00000000;
  2664.     Version: 300);
  2665. begin
  2666.   ControlData := @CControlData;
  2667. end;
  2668.  
  2669. procedure TFTP.InitControlInterface(const Obj: IUnknown);
  2670. begin
  2671.   FIntf := Obj as Iftpct;
  2672. end;
  2673.  
  2674. procedure TFTP.AboutBox;
  2675. begin
  2676.   ControlInterface.AboutBox;
  2677. end;
  2678.  
  2679. procedure TFTP.Cancel;
  2680. begin
  2681.   ControlInterface.Cancel;
  2682. end;
  2683.  
  2684. procedure TFTP.Connect(RemoteHost, RemotePort: OleVariant);
  2685. begin
  2686.   ControlInterface.Connect(RemoteHost, RemotePort);
  2687. end;
  2688.  
  2689. procedure TFTP.Authenticate(UserId, Password: OleVariant);
  2690. begin
  2691.   ControlInterface.Authenticate(UserId, Password);
  2692. end;
  2693.  
  2694. procedure TFTP.SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant);
  2695. begin
  2696.   ControlInterface.SendDoc(URL, Headers, InputData, InputFile, OutputFile);
  2697. end;
  2698.  
  2699. procedure TFTP.GetDoc(URL, Headers, OutputFile: OleVariant);
  2700. begin
  2701.   ControlInterface.GetDoc(URL, Headers, OutputFile);
  2702. end;
  2703.  
  2704. procedure TFTP.Abort;
  2705. begin
  2706.   ControlInterface.Abort;
  2707. end;
  2708.  
  2709. procedure TFTP.Account(const Account: WideString);
  2710. begin
  2711.   ControlInterface.Account(Account);
  2712. end;
  2713.  
  2714. procedure TFTP.ChangeDir(const directory: WideString);
  2715. begin
  2716.   ControlInterface.ChangeDir(directory);
  2717. end;
  2718.  
  2719. procedure TFTP.CreateDir(const directory: WideString);
  2720. begin
  2721.   ControlInterface.CreateDir(directory);
  2722. end;
  2723.  
  2724. procedure TFTP.DeleteDir(const directory: WideString);
  2725. begin
  2726.   ControlInterface.DeleteDir(directory);
  2727. end;
  2728.  
  2729. procedure TFTP.DeleteFile(const FileName: WideString);
  2730. begin
  2731.   ControlInterface.DeleteFile(FileName);
  2732. end;
  2733.  
  2734. procedure TFTP.Quit;
  2735. begin
  2736.   ControlInterface.Quit;
  2737. end;
  2738.  
  2739. procedure TFTP.Help(const Help: WideString);
  2740. begin
  2741.   ControlInterface.Help(Help);
  2742. end;
  2743.  
  2744. procedure TFTP.Noop;
  2745. begin
  2746.   ControlInterface.Noop;
  2747. end;
  2748.  
  2749. procedure TFTP.Mode(ftpMode: FTPModeConstants);
  2750. begin
  2751.   ControlInterface.Mode(ftpMode);
  2752. end;
  2753.  
  2754. procedure TFTP.Type_(ftpType: FTPTypeConstants);
  2755. begin
  2756.   ControlInterface.Type_(ftpType);
  2757. end;
  2758.  
  2759. procedure TFTP.List(const List: WideString);
  2760. begin
  2761.   ControlInterface.List(List);
  2762. end;
  2763.  
  2764. procedure TFTP.NameList(const NameList: WideString);
  2765. begin
  2766.   ControlInterface.NameList(NameList);
  2767. end;
  2768.  
  2769. procedure TFTP.ParentDir;
  2770. begin
  2771.   ControlInterface.ParentDir;
  2772. end;
  2773.  
  2774. procedure TFTP.PrintDir;
  2775. begin
  2776.   ControlInterface.PrintDir;
  2777. end;
  2778.  
  2779. procedure TFTP.Execute(const Execute: WideString);
  2780. begin
  2781.   ControlInterface.Execute(Execute);
  2782. end;
  2783.  
  2784. procedure TFTP.Status(const Status: WideString);
  2785. begin
  2786.   ControlInterface.Status(Status);
  2787. end;
  2788.  
  2789. procedure TFTP.PutFile(const srcFileName, destFileName: WideString);
  2790. begin
  2791.   ControlInterface.PutFile(srcFileName, destFileName);
  2792. end;
  2793.  
  2794. procedure TFTP.Reinitialize;
  2795. begin
  2796.   ControlInterface.Reinitialize;
  2797. end;
  2798.  
  2799. procedure TFTP.System;
  2800. begin
  2801.   ControlInterface.System;
  2802. end;
  2803.  
  2804. procedure TFTP.GetFile(const srcFileName, destFileName: WideString);
  2805. begin
  2806.   ControlInterface.GetFile(srcFileName, destFileName);
  2807. end;
  2808.  
  2809. procedure TFTP.PutFileUnique(const FileName: WideString);
  2810. begin
  2811.   ControlInterface.PutFileUnique(FileName);
  2812. end;
  2813.  
  2814. procedure TFTP.Site(const Site: WideString);
  2815. begin
  2816.   ControlInterface.Site(Site);
  2817. end;
  2818.  
  2819. function TFTP.Get_Timeout(event: Smallint): Integer;
  2820. begin
  2821.   Result := ControlInterface.Timeout[event];
  2822. end;
  2823.  
  2824. procedure TFTP.Set_Timeout(event: Smallint; Value: Integer);
  2825. begin
  2826.   ControlInterface.Timeout[event] := Value;
  2827. end;
  2828.  
  2829. procedure TFTP.Set_EnableTimer(event: Smallint; Value: WordBool);
  2830. begin
  2831.   ControlInterface.EnableTimer[event] := Value;
  2832. end;
  2833.  
  2834. function TFTP.Get_Errors: icErrors;
  2835. begin
  2836.   Result := ControlInterface.Errors;
  2837. end;
  2838.  
  2839. function TFTP.Get_DocInput: DocInput;
  2840. begin
  2841.   Result := ControlInterface.DocInput;
  2842. end;
  2843.  
  2844. function TFTP.Get_DocOutput: DocOutput;
  2845. begin
  2846.   Result := ControlInterface.DocOutput;
  2847. end;
  2848.  
  2849. function TFTP.Get_Firewall: IFirewall;
  2850. begin
  2851.   Result := ControlInterface.Firewall;
  2852. end;
  2853.  
  2854. class function CoProxy.Create: IHttpProxy;
  2855. begin
  2856.   Result := CreateComObject(Class_Proxy) as IHttpProxy;
  2857. end;
  2858.  
  2859. class function CoProxy.CreateRemote(const MachineName: string): IHttpProxy;
  2860. begin
  2861.   Result := CreateRemoteComObject(MachineName, Class_Proxy) as IHttpProxy;
  2862. end;
  2863.  
  2864. procedure THTTP.InitControlData;
  2865. const
  2866.   CEventDispIDs: array[0..8] of Integer = (
  2867.     $FFFFFDA0, $00000227, $00000228, $00000229, $0000022A, $0000022B,
  2868.     $0000022C, $000003F8, $000003F9);
  2869.   CLicenseKey: array[0..36] of Word = (
  2870.     $0037, $0030, $0037, $0038, $0031, $0037, $0036, $0030, $002D, $0035,
  2871.     $0035, $0064, $0064, $002D, $0031, $0031, $0063, $0066, $002D, $0061,
  2872.     $0039, $0037, $0066, $002D, $0030, $0030, $0032, $0030, $0061, $0066,
  2873.     $0033, $0066, $0038, $0037, $0062, $0035, $0000);
  2874.   CControlData: TControlData = (
  2875.     ClassID: '{B7FC3563-8CE7-11CF-9754-00AA00C00908}';
  2876.     EventIID: '{B7FC3562-8CE7-11CF-9754-00AA00C00908}';
  2877.     EventCount: 9;
  2878.     EventDispIDs: @CEventDispIDs;
  2879.     LicenseKey: @CLicenseKey;
  2880.     Flags: $00000000;
  2881.     Version: 300);
  2882. begin
  2883.   ControlData := @CControlData;
  2884. end;
  2885.  
  2886. procedure THTTP.InitControlInterface(const Obj: IUnknown);
  2887. begin
  2888.   FIntf := Obj as IHTTPCT;
  2889. end;
  2890.  
  2891. procedure THTTP.AboutBox;
  2892. begin
  2893.   ControlInterface.AboutBox;
  2894. end;
  2895.  
  2896. procedure THTTP.Cancel;
  2897. begin
  2898.   ControlInterface.Cancel;
  2899. end;
  2900.  
  2901. procedure THTTP.SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant);
  2902. begin
  2903.   ControlInterface.SendDoc(URL, Headers, InputData, InputFile, OutputFile);
  2904. end;
  2905.  
  2906. procedure THTTP.GetDoc(URL, Headers, OutputFile: OleVariant);
  2907. begin
  2908.   ControlInterface.GetDoc(URL, Headers, OutputFile);
  2909. end;
  2910.  
  2911. function THTTP.Get_Timeout(event: Smallint): Integer;
  2912. begin
  2913.   Result := ControlInterface.Timeout[event];
  2914. end;
  2915.  
  2916. procedure THTTP.Set_Timeout(event: Smallint; Value: Integer);
  2917. begin
  2918.   ControlInterface.Timeout[event] := Value;
  2919. end;
  2920.  
  2921. procedure THTTP.Set_EnableTimer(event: Smallint; Value: WordBool);
  2922. begin
  2923.   ControlInterface.EnableTimer[event] := Value;
  2924. end;
  2925.  
  2926. function THTTP.Get_Errors: icErrors;
  2927. begin
  2928.   Result := ControlInterface.Errors;
  2929. end;
  2930.  
  2931. function THTTP.Get_DocInput: DocInput;
  2932. begin
  2933.   Result := ControlInterface.DocInput;
  2934. end;
  2935.  
  2936. function THTTP.Get_DocOutput: DocOutput;
  2937. begin
  2938.   Result := ControlInterface.DocOutput;
  2939. end;
  2940.  
  2941. function THTTP.Get_Proxy: IHttpProxy;
  2942. begin
  2943.   Result := ControlInterface.Proxy;
  2944. end;
  2945.  
  2946. class function CoHTMLElementCls.Create: HTMLElement;
  2947. begin
  2948.   Result := CreateComObject(Class_HTMLElementCls) as HTMLElement;
  2949. end;
  2950.  
  2951. class function CoHTMLElementCls.CreateRemote(const MachineName: string): HTMLElement;
  2952. begin
  2953.   Result := CreateRemoteComObject(MachineName, Class_HTMLElementCls) as HTMLElement;
  2954. end;
  2955.  
  2956. class function CoHTMLFormCls.Create: HTMLForm;
  2957. begin
  2958.   Result := CreateComObject(Class_HTMLFormCls) as HTMLForm;
  2959. end;
  2960.  
  2961. class function CoHTMLFormCls.CreateRemote(const MachineName: string): HTMLForm;
  2962. begin
  2963.   Result := CreateRemoteComObject(MachineName, Class_HTMLFormCls) as HTMLForm;
  2964. end;
  2965.  
  2966. class function CoHTMLFormsCls.Create: HTMLForms;
  2967. begin
  2968.   Result := CreateComObject(Class_HTMLFormsCls) as HTMLForms;
  2969. end;
  2970.  
  2971. class function CoHTMLFormsCls.CreateRemote(const MachineName: string): HTMLForms;
  2972. begin
  2973.   Result := CreateRemoteComObject(MachineName, Class_HTMLFormsCls) as HTMLForms;
  2974. end;
  2975.  
  2976. class function CoHTMLAttrCls.Create: HTMLAttr;
  2977. begin
  2978.   Result := CreateComObject(Class_HTMLAttrCls) as HTMLAttr;
  2979. end;
  2980.  
  2981. class function CoHTMLAttrCls.CreateRemote(const MachineName: string): HTMLAttr;
  2982. begin
  2983.   Result := CreateRemoteComObject(MachineName, Class_HTMLAttrCls) as HTMLAttr;
  2984. end;
  2985.  
  2986. class function CoHTMLAttrsCls.Create: HTMLAttrs;
  2987. begin
  2988.   Result := CreateComObject(Class_HTMLAttrsCls) as HTMLAttrs;
  2989. end;
  2990.  
  2991. class function CoHTMLAttrsCls.CreateRemote(const MachineName: string): HTMLAttrs;
  2992. begin
  2993.   Result := CreateRemoteComObject(MachineName, Class_HTMLAttrsCls) as HTMLAttrs;
  2994. end;
  2995.  
  2996. procedure THTML.InitControlData;
  2997. const
  2998.   CEventDispIDs: array[0..12] of Integer = (
  2999.     $FFFFFDA0, $000003F8, $000003F9, $00000001, $00000002, $00000227,
  3000.     $00000004, $00000005, $00000006, $00000007, $00000008, $00000009,
  3001.     $0000000A);
  3002.   CLicenseKey: array[0..36] of Word = (
  3003.     $0036, $0036, $0061, $0062, $0037, $0030, $0064, $0030, $002D, $0035,
  3004.     $0035, $0064, $0033, $002D, $0031, $0031, $0063, $0066, $002D, $0038,
  3005.     $0030, $0034, $0063, $002D, $0030, $0030, $0061, $0030, $0032, $0034,
  3006.     $0032, $0034, $0065, $0039, $0032, $0037, $0000);
  3007.   CTFontIDs: array [0..7] of Integer = (
  3008.     $FFFFFE00, $0000001B, $0000001C, $0000001D, $0000001E, $0000001F,
  3009.     $00000020, $00000021);
  3010.   CControlData: TControlData = (
  3011.     ClassID: '{B7FC355E-8CE7-11CF-9754-00AA00C00908}';
  3012.     EventIID: '{B7FC355D-8CE7-11CF-9754-00AA00C00908}';
  3013.     EventCount: 13;
  3014.     EventDispIDs: @CEventDispIDs;
  3015.     LicenseKey: @CLicenseKey;
  3016.     Flags: $00000007;
  3017.     Version: 300;
  3018.     FontCount: 8;
  3019.     FontIDs: @CTFontIDs);
  3020. begin
  3021.   ControlData := @CControlData;
  3022. end;
  3023.  
  3024. procedure THTML.InitControlInterface(const Obj: IUnknown);
  3025. begin
  3026.   FIntf := Obj as IHTML;
  3027. end;
  3028.  
  3029. procedure THTML.AboutBox;
  3030. begin
  3031.   ControlInterface.AboutBox;
  3032. end;
  3033.  
  3034. procedure THTML.RequestDoc(const URL: WideString);
  3035. begin
  3036.   ControlInterface.RequestDoc(URL);
  3037. end;
  3038.  
  3039. procedure THTML.RequestAllEmbedded;
  3040. begin
  3041.   ControlInterface.RequestAllEmbedded;
  3042. end;
  3043.  
  3044. procedure THTML.Cancel(Message: OleVariant);
  3045. begin
  3046.   ControlInterface.Cancel(Message);
  3047. end;
  3048.  
  3049. procedure THTML.BeginPrinting(hDC: Integer; x, y, Width, Height, DefaultHeaders, DefaultTitle: OleVariant);
  3050. begin
  3051.   ControlInterface.BeginPrinting(hDC, x, y, Width, Height, DefaultHeaders, DefaultTitle);
  3052. end;
  3053.  
  3054. procedure THTML.PrintPage(hDC, PageNumber: Integer);
  3055. begin
  3056.   ControlInterface.PrintPage(hDC, PageNumber);
  3057. end;
  3058.  
  3059. procedure THTML.EndPrinting;
  3060. begin
  3061.   ControlInterface.EndPrinting;
  3062. end;
  3063.  
  3064. procedure THTML.AutoPrint(hDC: Integer);
  3065. begin
  3066.   ControlInterface.AutoPrint(hDC);
  3067. end;
  3068.  
  3069. function THTML.GetPlainText(selected, fancy: WordBool): WideString;
  3070. begin
  3071.   Result := ControlInterface.GetPlainText(selected, fancy);
  3072. end;
  3073.  
  3074. function THTML.HasSelection: WordBool;
  3075. begin
  3076.   Result := ControlInterface.HasSelection;
  3077. end;
  3078.  
  3079. procedure THTML.SelectAll;
  3080. begin
  3081.   ControlInterface.SelectAll;
  3082. end;
  3083.  
  3084. function THTML.Get_DocInput: DocInput;
  3085. begin
  3086.   Result := ControlInterface.DocInput;
  3087. end;
  3088.  
  3089. function THTML.Get_DocOutput: DocOutput;
  3090. begin
  3091.   Result := ControlInterface.DocOutput;
  3092. end;
  3093.  
  3094. function THTML.Get_Forms: HTMLForms;
  3095. begin
  3096.   Result := ControlInterface.Forms;
  3097. end;
  3098.  
  3099. function THTML.Get_IsPrintingDone(PageNumber: Integer): WordBool;
  3100. begin
  3101.   Result := ControlInterface.IsPrintingDone[PageNumber];
  3102. end;
  3103.  
  3104. function THTML.Get_Errors: icErrors;
  3105. begin
  3106.   Result := ControlInterface.Errors;
  3107. end;
  3108.  
  3109. function THTML.Get_hWnd: OLE_HANDLE;
  3110. begin
  3111.   Result := ControlInterface.hWnd;
  3112. end;
  3113.  
  3114. procedure TPOP.InitControlData;
  3115. const
  3116.   CEventDispIDs: array[0..13] of Integer = (
  3117.     $FFFFFDA0, $00000227, $00000228, $00000229, $0000022A, $0000022B,
  3118.     $0000022C, $000003F9, $000009A1, $000009A2, $000009A3, $000009A4,
  3119.     $000009A6, $000009A7);
  3120.   CLicenseKey: array[0..36] of Word = (
  3121.     $0066, $0062, $0037, $0036, $0036, $0033, $0065, $0030, $002D, $0035,
  3122.     $0035, $0030, $0035, $002D, $0031, $0031, $0063, $0066, $002D, $0061,
  3123.     $0036, $0037, $0036, $002D, $0030, $0030, $0032, $0030, $0061, $0066,
  3124.     $0036, $0061, $0030, $0062, $0066, $0032, $0000);
  3125.   CControlData: TControlData = (
  3126.     ClassID: '{B7FC356E-8CE7-11CF-9754-00AA00C00908}';
  3127.     EventIID: '{B7FC356D-8CE7-11CF-9754-00AA00C00908}';
  3128.     EventCount: 14;
  3129.     EventDispIDs: @CEventDispIDs;
  3130.     LicenseKey: @CLicenseKey;
  3131.     Flags: $00000000;
  3132.     Version: 300);
  3133. begin
  3134.   ControlData := @CControlData;
  3135. end;
  3136.  
  3137. procedure TPOP.InitControlInterface(const Obj: IUnknown);
  3138. begin
  3139.   FIntf := Obj as Ipopct;
  3140. end;
  3141.  
  3142. procedure TPOP.AboutBox;
  3143. begin
  3144.   ControlInterface.AboutBox;
  3145. end;
  3146.  
  3147. procedure TPOP.Cancel;
  3148. begin
  3149.   ControlInterface.Cancel;
  3150. end;
  3151.  
  3152. procedure TPOP.Connect(RemoteHost, RemotePort: OleVariant);
  3153. begin
  3154.   ControlInterface.Connect(RemoteHost, RemotePort);
  3155. end;
  3156.  
  3157. procedure TPOP.Authenticate(UserId, Password: OleVariant);
  3158. begin
  3159.   ControlInterface.Authenticate(UserId, Password);
  3160. end;
  3161.  
  3162. procedure TPOP.GetDoc(URL, Headers, OutputFile: OleVariant);
  3163. begin
  3164.   ControlInterface.GetDoc(URL, Headers, OutputFile);
  3165. end;
  3166.  
  3167. procedure TPOP.MessageSize(MessageNumber: Smallint);
  3168. begin
  3169.   ControlInterface.MessageSize(MessageNumber);
  3170. end;
  3171.  
  3172. procedure TPOP.RetrieveMessage(MessageNumber: Smallint);
  3173. begin
  3174.   ControlInterface.RetrieveMessage(MessageNumber);
  3175. end;
  3176.  
  3177. procedure TPOP.Delete(MessageNumber: Smallint);
  3178. begin
  3179.   ControlInterface.Delete(MessageNumber);
  3180. end;
  3181.  
  3182. procedure TPOP.Reset;
  3183. begin
  3184.   ControlInterface.Reset;
  3185. end;
  3186.  
  3187. procedure TPOP.Last;
  3188. begin
  3189.   ControlInterface.Last;
  3190. end;
  3191.  
  3192. procedure TPOP.Noop;
  3193. begin
  3194.   ControlInterface.Noop;
  3195. end;
  3196.  
  3197. procedure TPOP.TopMessage(MessageNumber: Smallint);
  3198. begin
  3199.   ControlInterface.TopMessage(MessageNumber);
  3200. end;
  3201.  
  3202. procedure TPOP.Quit;
  3203. begin
  3204.   ControlInterface.Quit;
  3205. end;
  3206.  
  3207. procedure TPOP.RefreshMessageCount;
  3208. begin
  3209.   ControlInterface.RefreshMessageCount;
  3210. end;
  3211.  
  3212. function TPOP.Get_Timeout(event: Smallint): Integer;
  3213. begin
  3214.   Result := ControlInterface.Timeout[event];
  3215. end;
  3216.  
  3217. procedure TPOP.Set_Timeout(event: Smallint; Value: Integer);
  3218. begin
  3219.   ControlInterface.Timeout[event] := Value;
  3220. end;
  3221.  
  3222. procedure TPOP.Set_EnableTimer(event: Smallint; Value: WordBool);
  3223. begin
  3224.   ControlInterface.EnableTimer[event] := Value;
  3225. end;
  3226.  
  3227. function TPOP.Get_Errors: icErrors;
  3228. begin
  3229.   Result := ControlInterface.Errors;
  3230. end;
  3231.  
  3232. function TPOP.Get_DocOutput: DocOutput;
  3233. begin
  3234.   Result := ControlInterface.DocOutput;
  3235. end;
  3236.  
  3237. procedure TNNTP.InitControlData;
  3238. const
  3239.   CEventDispIDs: array[0..15] of Integer = (
  3240.     $FFFFFDA0, $00000227, $00000228, $00000229, $0000022A, $0000022B,
  3241.     $0000022C, $000003F8, $000003F9, $00000000, $00000001, $00000002,
  3242.     $00000003, $00000004, $00000005, $00000006);
  3243.   CLicenseKey: array[0..36] of Word = (
  3244.     $0038, $0036, $0063, $0033, $0065, $0038, $0038, $0030, $002D, $0035,
  3245.     $0035, $0039, $0035, $002D, $0031, $0031, $0063, $0066, $002D, $0039,
  3246.     $0036, $0065, $0037, $002D, $0030, $0030, $0038, $0030, $0063, $0037,
  3247.     $0063, $0033, $0063, $0032, $0038, $0034, $0000);
  3248.   CControlData: TControlData = (
  3249.     ClassID: '{B7FC3568-8CE7-11CF-9754-00AA00C00908}';
  3250.     EventIID: '{B7FC3567-8CE7-11CF-9754-00AA00C00908}';
  3251.     EventCount: 16;
  3252.     EventDispIDs: @CEventDispIDs;
  3253.     LicenseKey: @CLicenseKey;
  3254.     Flags: $00000000;
  3255.     Version: 300);
  3256. begin
  3257.   ControlData := @CControlData;
  3258. end;
  3259.  
  3260. procedure TNNTP.InitControlInterface(const Obj: IUnknown);
  3261. begin
  3262.   FIntf := Obj as Inntpct;
  3263. end;
  3264.  
  3265. procedure TNNTP.AboutBox;
  3266. begin
  3267.   ControlInterface.AboutBox;
  3268. end;
  3269.  
  3270. procedure TNNTP.Cancel;
  3271. begin
  3272.   ControlInterface.Cancel;
  3273. end;
  3274.  
  3275. procedure TNNTP.Connect(RemoteHost, RemotePort: OleVariant);
  3276. begin
  3277.   ControlInterface.Connect(RemoteHost, RemotePort);
  3278. end;
  3279.  
  3280. procedure TNNTP.SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant);
  3281. begin
  3282.   ControlInterface.SendDoc(URL, Headers, InputData, InputFile, OutputFile);
  3283. end;
  3284.  
  3285. procedure TNNTP.GetDoc(URL, Headers, OutputFile: OleVariant);
  3286. begin
  3287.   ControlInterface.GetDoc(URL, Headers, OutputFile);
  3288. end;
  3289.  
  3290. procedure TNNTP.GetAdministrationFile(LastUpdate: OleVariant);
  3291. begin
  3292.   ControlInterface.GetAdministrationFile(LastUpdate);
  3293. end;
  3294.  
  3295. procedure TNNTP.SelectGroup(const groupName: WideString);
  3296. begin
  3297.   ControlInterface.SelectGroup(groupName);
  3298. end;
  3299.  
  3300. procedure TNNTP.SetNextArticle;
  3301. begin
  3302.   ControlInterface.SetNextArticle;
  3303. end;
  3304.  
  3305. procedure TNNTP.SetLastArticle;
  3306. begin
  3307.   ControlInterface.SetLastArticle;
  3308. end;
  3309.  
  3310. procedure TNNTP.GetArticleNumbers(groupName: OleVariant);
  3311. begin
  3312.   ControlInterface.GetArticleNumbers(groupName);
  3313. end;
  3314.  
  3315. procedure TNNTP.GetArticleHeaders(const header: WideString; firstArticle, lastArticle: OleVariant);
  3316. begin
  3317.   ControlInterface.GetArticleHeaders(header, firstArticle, lastArticle);
  3318. end;
  3319.  
  3320. procedure TNNTP.GetArticleByArticleNumber(articleNumber: OleVariant);
  3321. begin
  3322.   ControlInterface.GetArticleByArticleNumber(articleNumber);
  3323. end;
  3324.  
  3325. procedure TNNTP.GetArticleByMessageID(const messageID: WideString);
  3326. begin
  3327.   ControlInterface.GetArticleByMessageID(messageID);
  3328. end;
  3329.  
  3330. procedure TNNTP.GetHeaderByArticleNumber(articleNumber: OleVariant);
  3331. begin
  3332.   ControlInterface.GetHeaderByArticleNumber(articleNumber);
  3333. end;
  3334.  
  3335. procedure TNNTP.GetHeaderByMessageID(const messageID: WideString);
  3336. begin
  3337.   ControlInterface.GetHeaderByMessageID(messageID);
  3338. end;
  3339.  
  3340. procedure TNNTP.GetBodyByArticleNumber(articleNumber: OleVariant);
  3341. begin
  3342.   ControlInterface.GetBodyByArticleNumber(articleNumber);
  3343. end;
  3344.  
  3345. procedure TNNTP.GetBodyByMessageID(const messageID: WideString);
  3346. begin
  3347.   ControlInterface.GetBodyByMessageID(messageID);
  3348. end;
  3349.  
  3350. procedure TNNTP.GetStatByArticleNumber(articleNumber: OleVariant);
  3351. begin
  3352.   ControlInterface.GetStatByArticleNumber(articleNumber);
  3353. end;
  3354.  
  3355. procedure TNNTP.GetOverviewFormat;
  3356. begin
  3357.   ControlInterface.GetOverviewFormat;
  3358. end;
  3359.  
  3360. procedure TNNTP.GetOverview(firstArticle, lastArticle: OleVariant);
  3361. begin
  3362.   ControlInterface.GetOverview(firstArticle, lastArticle);
  3363. end;
  3364.  
  3365. procedure TNNTP.ListGroups;
  3366. begin
  3367.   ControlInterface.ListGroups;
  3368. end;
  3369.  
  3370. procedure TNNTP.ListGroupDescriptions;
  3371. begin
  3372.   ControlInterface.ListGroupDescriptions;
  3373. end;
  3374.  
  3375. procedure TNNTP.ListNewGroups(LastUpdate: OleVariant);
  3376. begin
  3377.   ControlInterface.ListNewGroups(LastUpdate);
  3378. end;
  3379.  
  3380. procedure TNNTP.Quit;
  3381. begin
  3382.   ControlInterface.Quit;
  3383. end;
  3384.  
  3385. function TNNTP.Get_Timeout(event: Smallint): Integer;
  3386. begin
  3387.   Result := ControlInterface.Timeout[event];
  3388. end;
  3389.  
  3390. procedure TNNTP.Set_Timeout(event: Smallint; Value: Integer);
  3391. begin
  3392.   ControlInterface.Timeout[event] := Value;
  3393. end;
  3394.  
  3395. procedure TNNTP.Set_EnableTimer(event: Smallint; Value: WordBool);
  3396. begin
  3397.   ControlInterface.EnableTimer[event] := Value;
  3398. end;
  3399.  
  3400. function TNNTP.Get_Errors: icErrors;
  3401. begin
  3402.   Result := ControlInterface.Errors;
  3403. end;
  3404.  
  3405. function TNNTP.Get_DocInput: DocInput;
  3406. begin
  3407.   Result := ControlInterface.DocInput;
  3408. end;
  3409.  
  3410. function TNNTP.Get_DocOutput: DocOutput;
  3411. begin
  3412.   Result := ControlInterface.DocOutput;
  3413. end;
  3414.  
  3415. procedure TSMTP.InitControlData;
  3416. const
  3417.   CEventDispIDs: array[0..12] of Integer = (
  3418.     $FFFFFDA0, $00000227, $00000228, $00000229, $0000022A, $0000022B,
  3419.     $0000022C, $000003F8, $0000012C, $0000012D, $0000012E, $0000012F,
  3420.     $00000130);
  3421.   CLicenseKey: array[0..36] of Word = (
  3422.     $0062, $0037, $0034, $0034, $0034, $0065, $0065, $0030, $002D, $0035,
  3423.     $0035, $0062, $0065, $002D, $0031, $0031, $0063, $0066, $002D, $0039,
  3424.     $0036, $0065, $0037, $002D, $0030, $0030, $0038, $0030, $0063, $0037,
  3425.     $0063, $0033, $0063, $0032, $0038, $0034, $0000);
  3426.   CControlData: TControlData = (
  3427.     ClassID: '{B7FC3573-8CE7-11CF-9754-00AA00C00908}';
  3428.     EventIID: '{B7FC3572-8CE7-11CF-9754-00AA00C00908}';
  3429.     EventCount: 13;
  3430.     EventDispIDs: @CEventDispIDs;
  3431.     LicenseKey: @CLicenseKey;
  3432.     Flags: $00000000;
  3433.     Version: 300);
  3434. begin
  3435.   ControlData := @CControlData;
  3436. end;
  3437.  
  3438. procedure TSMTP.InitControlInterface(const Obj: IUnknown);
  3439. begin
  3440.   FIntf := Obj as Ismtpct;
  3441. end;
  3442.  
  3443. procedure TSMTP.AboutBox;
  3444. begin
  3445.   ControlInterface.AboutBox;
  3446. end;
  3447.  
  3448. procedure TSMTP.Cancel;
  3449. begin
  3450.   ControlInterface.Cancel;
  3451. end;
  3452.  
  3453. procedure TSMTP.Connect(RemoteHost, RemotePort: OleVariant);
  3454. begin
  3455.   ControlInterface.Connect(RemoteHost, RemotePort);
  3456. end;
  3457.  
  3458. procedure TSMTP.SendDoc(URL, Headers, InputData, InputFile, OutputFile: OleVariant);
  3459. begin
  3460.   ControlInterface.SendDoc(URL, Headers, InputData, InputFile, OutputFile);
  3461. end;
  3462.  
  3463. procedure TSMTP.Reset;
  3464. begin
  3465.   ControlInterface.Reset;
  3466. end;
  3467.  
  3468. procedure TSMTP.Verify(const name: WideString);
  3469. begin
  3470.   ControlInterface.Verify(name);
  3471. end;
  3472.  
  3473. procedure TSMTP.Expand(const name: WideString);
  3474. begin
  3475.   ControlInterface.Expand(name);
  3476. end;
  3477.  
  3478. procedure TSMTP.Help(helpTopic: OleVariant);
  3479. begin
  3480.   ControlInterface.Help(helpTopic);
  3481. end;
  3482.  
  3483. procedure TSMTP.Noop;
  3484. begin
  3485.   ControlInterface.Noop;
  3486. end;
  3487.  
  3488. procedure TSMTP.Quit;
  3489. begin
  3490.   ControlInterface.Quit;
  3491. end;
  3492.  
  3493. function TSMTP.Get_Timeout(event: Smallint): Integer;
  3494. begin
  3495.   Result := ControlInterface.Timeout[event];
  3496. end;
  3497.  
  3498. procedure TSMTP.Set_Timeout(event: Smallint; Value: Integer);
  3499. begin
  3500.   ControlInterface.Timeout[event] := Value;
  3501. end;
  3502.  
  3503. procedure TSMTP.Set_EnableTimer(event: Smallint; Value: WordBool);
  3504. begin
  3505.   ControlInterface.EnableTimer[event] := Value;
  3506. end;
  3507.  
  3508. function TSMTP.Get_Errors: icErrors;
  3509. begin
  3510.   Result := ControlInterface.Errors;
  3511. end;
  3512.  
  3513. function TSMTP.Get_DocInput: DocInput;
  3514. begin
  3515.   Result := ControlInterface.DocInput;
  3516. end;
  3517.  
  3518. procedure TTCP.InitControlData;
  3519. const
  3520.   CEventDispIDs: array[0..6] of Integer = (
  3521.     $FFFFFDA0, $0000041B, $0000047F, $00000480, $00000483, $00000481,
  3522.     $00000482);
  3523.   CLicenseKey: array[0..36] of Word = (
  3524.     $0062, $0033, $0031, $0035, $0063, $0035, $0033, $0030, $002D, $0035,
  3525.     $0032, $0039, $0038, $002D, $0031, $0031, $0063, $0066, $002D, $0061,
  3526.     $0061, $0061, $0032, $002D, $0030, $0030, $0032, $0030, $0061, $0066,
  3527.     $0032, $0063, $0065, $0065, $0035, $0065, $0000);
  3528.   CControlData: TControlData = (
  3529.     ClassID: '{B7FC3584-8CE7-11CF-9754-00AA00C00908}';
  3530.     EventIID: '{B7FC3583-8CE7-11CF-9754-00AA00C00908}';
  3531.     EventCount: 7;
  3532.     EventDispIDs: @CEventDispIDs;
  3533.     LicenseKey: @CLicenseKey;
  3534.     Flags: $00000000;
  3535.     Version: 300);
  3536. begin
  3537.   ControlData := @CControlData;
  3538. end;
  3539.  
  3540. procedure TTCP.InitControlInterface(const Obj: IUnknown);
  3541. begin
  3542.   FIntf := Obj as ITCP;
  3543. end;
  3544.  
  3545. procedure TTCP.AboutBox;
  3546. begin
  3547.   ControlInterface.AboutBox;
  3548. end;
  3549.  
  3550. procedure TTCP.Connect(RemoteHost, RemotePort: OleVariant);
  3551. begin
  3552.   ControlInterface.Connect(RemoteHost, RemotePort);
  3553. end;
  3554.  
  3555. procedure TTCP.Listen;
  3556. begin
  3557.   ControlInterface.Listen;
  3558. end;
  3559.  
  3560. procedure TTCP.Accept(requestID: Integer);
  3561. begin
  3562.   ControlInterface.Accept(requestID);
  3563. end;
  3564.  
  3565. procedure TTCP.SendData(data: OleVariant);
  3566. begin
  3567.   ControlInterface.SendData(data);
  3568. end;
  3569.  
  3570. procedure TTCP.GetData(var data: OleVariant; type_, maxLen: OleVariant);
  3571. begin
  3572.   ControlInterface.GetData(data, type_, maxLen);
  3573. end;
  3574.  
  3575. procedure TTCP.PeekData(var data: OleVariant; type_, maxLen: OleVariant);
  3576. begin
  3577.   ControlInterface.PeekData(data, type_, maxLen);
  3578. end;
  3579.  
  3580. procedure TTCP.Close;
  3581. begin
  3582.   ControlInterface.Close;
  3583. end;
  3584.  
  3585.  
  3586. procedure TUDP.InitControlData;
  3587. const
  3588.   CEventDispIDs: array[0..1] of Integer = (
  3589.     $FFFFFDA0, $0000041B);
  3590.   CLicenseKey: array[0..36] of Word = (
  3591.     $0062, $0033, $0031, $0035, $0063, $0035, $0033, $0030, $002D, $0035,
  3592.     $0032, $0039, $0038, $002D, $0031, $0031, $0063, $0066, $002D, $0061,
  3593.     $0061, $0061, $0032, $002D, $0030, $0030, $0032, $0030, $0061, $0066,
  3594.     $0032, $0063, $0065, $0065, $0035, $0065, $0000);
  3595.   CControlData: TControlData = (
  3596.     ClassID: '{B7FC3587-8CE7-11CF-9754-00AA00C00908}';
  3597.     EventIID: '{B7FC3586-8CE7-11CF-9754-00AA00C00908}';
  3598.     EventCount: 2;
  3599.     EventDispIDs: @CEventDispIDs;
  3600.     LicenseKey: @CLicenseKey;
  3601.     Flags: $00000000;
  3602.     Version: 300);
  3603. begin
  3604.   ControlData := @CControlData;
  3605. end;
  3606.  
  3607. procedure TUDP.InitControlInterface(const Obj: IUnknown);
  3608. begin
  3609.   FIntf := Obj as IUDP;
  3610. end;
  3611.  
  3612. procedure TUDP.AboutBox;
  3613. begin
  3614.   ControlInterface.AboutBox;
  3615. end;
  3616.  
  3617. procedure TUDP.SendData(data: OleVariant);
  3618. begin
  3619.   ControlInterface.SendData(data);
  3620. end;
  3621.  
  3622. procedure TUDP.GetData(var data: OleVariant; type_: OleVariant);
  3623. begin
  3624.   ControlInterface.GetData(data, type_);
  3625. end;
  3626.  
  3627.  
  3628. procedure Register;
  3629. begin
  3630.   RegisterComponents('Internet', [TFTP, THTML, THTTP, TNNTP, TPOP, TSMTP,
  3631.     TTCP, TUDP]);
  3632. end;
  3633.  
  3634. end.
  3635.