亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sconnect.pas

?? 在Midas數(shù)據(jù)庫編程中
?? PAS
?? 第 1 頁 / 共 5 頁
字號:

{*******************************************************}
{                                                       }
{       Borland Delphi Visual Component Library         }
{       Streamed Connection classes                     }
{                                                       }
{       Copyright (c) 1997,99 Inprise Corporation       }
{                                                       }
{*******************************************************}

unit SConnect;

{$R-}

interface

uses
  Variants, Windows, Messages, Classes, SysUtils, MConnect, ScktComp, WinSock,
  WinInet, ComObj;

type

  {$HPPEMIT '#pragma link "wininet.lib"'}

  { IDataBlock }

  IDataBlock = interface(IUnknown)
  ['{CA6564C2-4683-11D1-88D4-00A0248E5091}']
    function GetBytesReserved: Integer; stdcall;
    function GetMemory: Pointer; stdcall;
    function GetSize: Integer; stdcall;
    procedure SetSize(Value: Integer); stdcall;
    function GetStream: TStream; stdcall;
    function GetSignature: Integer; stdcall;
    procedure SetSignature(Value: Integer); stdcall;
    procedure Clear; stdcall;
    function Write(const Buffer; Count: Integer): Integer; stdcall;
    function Read(var Buffer; Count: Integer): Integer; stdcall;
    procedure IgnoreStream; stdcall;
    function InitData(Data: Pointer; DataLen: Integer; CheckLen: Boolean): Integer; stdcall;
    property BytesReserved: Integer read GetBytesReserved;
    property Memory: Pointer read GetMemory;
    property Signature: Integer read GetSignature write SetSignature;
    property Size: Integer read GetSize write SetSize;
    property Stream: TStream read GetStream;
  end;

  { ISendDataBlock }

  ISendDataBlock = interface
  ['{87AD1043-470E-11D1-88D5-00A0248E5091}']
    function Send(const Data: IDataBlock; WaitForResult: Boolean): IDataBlock; stdcall;
  end;

  { ITransport }

  ITransport = interface(IUnknown)
  ['{CA6564C1-4683-11D1-88D4-00A0248E5091}']
    function GetWaitEvent: THandle; stdcall;
    function GetConnected: Boolean; stdcall;
    procedure SetConnected(Value: Boolean); stdcall;
    function Receive(WaitForInput: Boolean; Context: Integer): IDataBlock; stdcall;
    function Send(const Data: IDataBlock): Integer; stdcall;
    property Connected: Boolean read GetConnected write SetConnected;
  end;

  { IDataIntercept }

  IDataIntercept = interface
  ['{B249776B-E429-11D1-AAA4-00C04FA35CFA}']
    procedure DataIn(const Data: IDataBlock); stdcall;
    procedure DataOut(const Data: IDataBlock); stdcall;
  end;

  { TDataBlock }

  TDataBlock = class(TInterfacedObject, IDataBlock)
  private
    FStream: TMemoryStream;
    FReadPos: Integer;
    FWritePos: Integer;
    FIgnoreStream: Boolean;
  protected
    { IDataBlock }
    function GetBytesReserved: Integer; stdcall;
    function GetMemory: Pointer; stdcall;
    function GetSize: Integer; stdcall;
    procedure SetSize(Value: Integer); stdcall;
    function GetStream: TStream; stdcall;
    function GetSignature: Integer; stdcall;
    procedure SetSignature(Value: Integer); stdcall;
    procedure Clear; stdcall;
    function Write(const Buffer; Count: Integer): Integer; stdcall;
    function Read(var Buffer; Count: Integer): Integer; stdcall;
    procedure IgnoreStream; stdcall;
    function InitData(Data: Pointer; DataLen: Integer; CheckLen: Boolean): Integer; stdcall;
    property BytesReserved: Integer read GetBytesReserved;
    property Memory: Pointer read GetMemory;
    property Signature: Integer read GetSignature write SetSignature;
    property Size: Integer read GetSize write SetSize;
    property Stream: TStream read GetStream;
  public
    constructor Create;
    destructor Destroy; override;
  end;

  { TDataBlockInterpreter }

const

  { Action Signatures }

  CallSig         = $DA00; // Call signature
  ResultSig       = $DB00; // Result signature
  asError         = $01;   // Specify an exception was raised
  asInvoke        = $02;   // Specify a call to Invoke
  asGetID         = $03;   // Specify a call to GetIdsOfNames
  asCreateObject  = $04;   // Specify a com object to create
  asFreeObject    = $05;   // Specify a dispatch to free
  asGetServers    = $10;   // Get classname list
  asGetGUID       = $11;   // Get GUID for ClassName
  asGetAppServers = $12;   // Get AppServer classname list
  asSoapCommand   = $14;   // Soap command
  asMask          = $FF;   // Mask for action

type

  PIntArray = ^TIntArray;
  TIntArray = array[0..0] of Integer;

  PVariantArray = ^TVariantArray;
  TVariantArray = array[0..0] of OleVariant;

  TVarFlag = (vfByRef, vfVariant);
  TVarFlags = set of TVarFlag;

  EInterpreterError = class(Exception);

  TDataDispatch = class;


  TCustomDataBlockInterpreter = class
  protected
    procedure AddDispatch(Value: TDataDispatch); virtual; abstract;
    procedure RemoveDispatch(Value: TDataDispatch); virtual; abstract;

    { Sending Calls }
    procedure CallFreeObject(DispatchIndex: Integer); virtual; abstract;
    function CallGetIDsOfNames(DispatchIndex: Integer; const IID: TGUID; Names: Pointer; NameCount, LocaleID: Integer; DispIDs: Pointer): HResult; virtual; stdcall; abstract;
    function CallInvoke(DispatchIndex, DispID: Integer; const IID: TGUID; LocaleID: Integer;
      Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer): HResult; virtual; stdcall; abstract;
    function CallGetServerList: OleVariant; virtual; abstract;

    { Receiving Calls }


    function InternalCreateObject(const ClassID: TGUID): OleVariant; virtual; abstract;
    function CreateObject(const Name: string): OleVariant; virtual; abstract;
    function StoreObject(const Value: OleVariant): Integer; virtual; abstract;
    function LockObject(ID: Integer): IDispatch; virtual; abstract;
    procedure UnlockObject(ID: Integer; const Disp: IDispatch); virtual; abstract;
    procedure ReleaseObject(ID: Integer); virtual; abstract;
    function CanCreateObject(const ClassID: TGUID): Boolean; virtual; abstract;
    function CallCreateObject(Name: string): OleVariant;  virtual;  abstract;
  public
    procedure InterpretData(const Data: IDataBlock); virtual; abstract;
  end;


  { TBinary... }
  TDataBlockInterpreter = class(TCustomDataBlockInterpreter)
  private
    FDispatchList: TList;
    FDispList: OleVariant;
    FSendDataBlock: ISendDataBlock;
    FCheckRegValue: string;
    function GetVariantPointer(const Value: OleVariant): Pointer;
    procedure CopyDataByRef(const Source: TVarData; var Dest: TVarData);
    function ReadArray(VType: Integer; const Data: IDataBlock): OleVariant;
    procedure WriteArray(const Value: OleVariant; const Data: IDataBlock);
    function ReadVariant(out Flags: TVarFlags; const Data: IDataBlock): OleVariant;
    procedure WriteVariant(const Value: OleVariant; const Data: IDataBlock);
    procedure DoException(const Data: IDataBlock);
  protected
    procedure AddDispatch(Value: TDataDispatch); override;
    procedure RemoveDispatch(Value: TDataDispatch); override;
    function InternalCreateObject(const ClassID: TGUID): OleVariant; override;
    function CreateObject(const Name: string): OleVariant; override;
    function StoreObject(const Value: OleVariant): Integer; override;
    function LockObject(ID: Integer): IDispatch; override;
    procedure UnlockObject(ID: Integer; const Disp: IDispatch); override;
    procedure ReleaseObject(ID: Integer); override;
    function CanCreateObject(const ClassID: TGUID): Boolean; override;

    {Sending Calls}
    procedure CallFreeObject(DispatchIndex: Integer); override;
    function CallGetIDsOfNames(DispatchIndex: Integer; const IID: TGUID; Names: Pointer;
      NameCount, LocaleID: Integer; DispIDs: Pointer): HResult; override;
    function CallInvoke(DispatchIndex, DispID: Integer; const IID: TGUID; LocaleID: Integer;
      Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer): HResult;  override;
    function CallGetServerList: OleVariant; override;

    {Receiving Calls}
    procedure DoCreateObject(const Data: IDataBlock);
    procedure DoFreeObject(const Data: IDataBlock);
    procedure DoGetIDsOfNames(const Data: IDataBlock);
    procedure DoInvoke(const Data: IDataBlock);
    function DoCustomAction(Action: Integer; const Data: IDataBlock): Boolean; virtual;
    procedure DoGetAppServerList(const Data: IDataBlock);
    procedure DoGetServerList(const Data: IDataBlock);

  public
    constructor Create(SendDataBlock: ISendDataBlock; CheckRegValue: string);
    destructor Destroy; override;
    function CallCreateObject(Name: string): OleVariant;  override;
    procedure InterpretData(const Data: IDataBlock); override;
  end;

{ TDataDispatch }

  TDataDispatch = class(TInterfacedObject, IDispatch)
  private
    FDispatchIndex: Integer;
    FInterpreter: TCustomDataBlockInterpreter;
  protected
    property DispatchIndex: Integer read FDispatchIndex;
    { IDispatch }
    function GetTypeInfoCount(out Count: Integer): HResult; stdcall;
    function GetTypeInfo(Index, LocaleID: Integer; out TypeInfo): HResult; stdcall;
    function GetIDsOfNames(const IID: TGUID; Names: Pointer;
      NameCount, LocaleID: Integer; DispIDs: Pointer): HResult; stdcall;
    function Invoke(DispID: Integer; const IID: TGUID; LocaleID: Integer;
      Flags: Word; var Params; VarResult, ExcepInfo, ArgErr: Pointer): HResult; stdcall;
  public
    constructor Create(Interpreter: TCustomDataBlockInterpreter; DispatchIndex: Integer);
    destructor Destroy; override;
  end;

  { TTransportThread }

const
  THREAD_SENDSTREAM       = WM_USER + 1;
  THREAD_RECEIVEDSTREAM   = THREAD_SENDSTREAM + 1;
  THREAD_EXCEPTION        = THREAD_RECEIVEDSTREAM + 1;
  THREAD_SENDNOTIFY       = THREAD_EXCEPTION + 1;
  THREAD_REPLACETRANSPORT = THREAD_SENDNOTIFY + 1;

type

  TTransportThread = class(TThread)
  private
    FParentHandle: THandle;
    FSemaphore: THandle;
    FTransport: ITransport;
  public
    constructor Create(AHandle: THandle; Transport: ITransport); virtual;
    destructor Destroy; override;
    property Semaphore: THandle read FSemaphore;
    procedure Execute; override;
  end;

  { TStreamedConnection }

  TStreamedConnection = class(TDispatchConnection, ISendDataBlock)
  private
    FRefCount: Integer;
    FHandle: THandle;
    FTransport: TTransportThread;
    FTransIntf: ITransport;
    FInterpreter: TCustomDataBlockInterpreter;
    FSupportCallbacks: Boolean;
    FInterceptGUID: TGUID;
    FInterceptName: string;
    function GetHandle: THandle;
    procedure TransportTerminated(Sender: TObject);
    procedure SetSupportCallbacks(Value: Boolean);
    procedure SetInterceptName(const Value: string);
    function GetInterceptGUID: string;
    procedure SetInterceptGUID(const Value: string);
  protected
    { IUnknown }
    function QueryInterface(const IID: TGUID; out Obj): HResult; reintroduce; stdcall;
    function _AddRef: Integer; stdcall;
    function _Release: Integer; stdcall;
    { ISendDataBlock }
    function Send(const Data: IDataBlock; WaitForResult: Boolean): IDataBlock; stdcall;

    procedure InternalOpen; virtual;
    procedure InternalClose; virtual;

    procedure ThreadReceivedStream(var Message: TMessage); message THREAD_RECEIVEDSTREAM;
    procedure ThreadException(var Message: TMessage); message THREAD_EXCEPTION;
    procedure WndProc(var Message: TMessage);
    function CreateTransport: ITransport; virtual;
    procedure DoConnect; override;
    procedure DoDisconnect; override;
    procedure DoError(E: Exception); virtual;

    function GetInterpreter: TCustomDataBlockInterpreter; virtual;

    property Interpreter: TCustomDataBlockInterpreter read GetInterpreter;
    property Handle: THandle read GetHandle;
    property SupportCallbacks: Boolean read FSupportCallbacks write SetSupportCallbacks default True;
    property InterceptGUID: string read GetInterceptGUID write SetInterceptGUID;
    property InterceptName: string read FInterceptName write SetInterceptName;
  public
    function GetInterceptorList: OleVariant; virtual;
    function GetServerList: OleVariant; override;
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  end;

  { TSocketTransport }

  ESocketConnectionError = class(Exception);

  TSocketTransport = class(TInterfacedObject, ITransport)
  private
    FEvent: THandle;
    FAddress: string;
    FHost: string;
    FPort: Integer;
    FClientSocket: TClientSocket;
    FSocket: TCustomWinSocket;
    FInterceptGUID: string;
    FInterceptor: IDataIntercept;
    FCreateAttempted: Boolean;
    function CheckInterceptor: Boolean;
    procedure InterceptIncoming(const Data: IDataBlock);
    procedure InterceptOutgoing(const Data: IDataBlock);
  protected
    { ITransport }
    function GetWaitEvent: THandle; stdcall;
    function GetConnected: Boolean; stdcall;
    procedure SetConnected(Value: Boolean); stdcall;
    function Receive(WaitForInput: Boolean; Context: Integer): IDataBlock; stdcall;
    function Send(const Data: IDataBlock): Integer; stdcall;
  public
    constructor Create;
    destructor Destroy; override;
    property Host: string read FHost write FHost;
    property Address: string read FAddress write FAddress;
    property Port: Integer read FPort write FPort;
    property Socket: TCustomWinSocket read FSocket write FSocket;
    property InterceptGUID: string read FInterceptGUID write FInterceptGUID;
  end;

  { TSocketConnection }

  TSocketConnection = class(TStreamedConnection)
  private
    FAddress: string;
    FHost: string;
    FPort: Integer;
    procedure SetAddress(Value: string);
    procedure SetHost(Value: string);
    function IsHostStored: Boolean;
    function IsAddressStored: Boolean;
  protected
    function CreateTransport: ITransport; override;
    procedure DoConnect; override;
  public
    constructor Create(AOwner: TComponent); override;
  published
    property Address: string read FAddress write SetAddress stored IsAddressStored;
    property Host: string read FHost write SetHost stored IsHostStored;
    property InterceptGUID;
    property InterceptName;
    property Port: Integer read FPort write FPort default 211;
    property SupportCallbacks;
    property ObjectBroker;
  end;

  { TWebConnection }

  TWebConnection = class(TStreamedConnection, ITransport)
  private
    FAgent: string;
    FUserName: string;
    FPassword: string;
    FURL: string;
    FURLHost: string;
    FURLSite: string;
    FURLPort: Integer;
    FURLScheme: Integer;
    FProxy: string;
    FProxyByPass: string;
    FInetRoot: HINTERNET;
    FInetConnect: HINTERNET;
    FInterpreter: TCustomDataBlockInterpreter;
    procedure Check(Error: Boolean);
    function IsURLStored: Boolean;
    procedure SetURL(const Value: string);
  protected
    { ITransport }
    function GetInterpreter: TCustomDataBlockInterpreter; override;
    function GetWaitEvent: THandle; stdcall;
    function Transport_GetConnected: Boolean; stdcall;
    function ITransport.GetConnected = Transport_GetConnected;
    procedure Transport_SetConnected(Value: Boolean); stdcall;
    procedure ITransport.SetConnected = Transport_SetConnected;
    function Receive(WaitForInput: Boolean; Context: Integer): IDataBlock; stdcall;
    function Send(const Data: IDataBlock): Integer; stdcall;
  protected
    function CreateTransport: ITransport; override;
    procedure DoConnect; override;
    property SupportCallbacks default False;
  public
    constructor Create(AOwner: TComponent); override;
    destructor Destroy; override;
  published
    property Agent: string read FAgent write FAgent;
    property UserName: string read FUserName write FUserName;
    property Password: string read FPassword write FPassword;
    property URL: string read FURL write SetURL stored IsURLStored;
    property Proxy: string read FProxy write FProxy;
    property ProxyByPass: string read FProxyByPass write FProxyByPass;
    property ObjectBroker;
  end;

  { TPacketInterceptFactory }

  TPacketInterceptFactory = class(TComObjectFactory)
  public
    procedure UpdateRegistry(Register: Boolean); override;
  end;
  {$EXTERNALSYM TPacketInterceptFactory}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色播五月激情综合网| 亚洲电影在线免费观看| 国产成人亚洲精品狼色在线| 久久久精品黄色| 国产91对白在线观看九色| 国产精品久久久久久久久免费相片| 国产精品一区二区久激情瑜伽| 国产精品家庭影院| 欧美三区在线视频| 日本va欧美va欧美va精品| 久久精品亚洲精品国产欧美kt∨| 成人激情电影免费在线观看| 亚洲一区二区三区四区在线免费观看| 欧美精品三级日韩久久| 国产一区二区三区香蕉 | 欧美福利视频一区| 韩国精品在线观看| 亚洲手机成人高清视频| 91精品国产综合久久精品app | 成人午夜电影网站| 一区二区三区四区在线免费观看| 欧美高清一级片在线| 国产成人免费av在线| 亚洲一区二区影院| 久久色.com| 亚洲va欧美va国产va天堂影院| 肉丝袜脚交视频一区二区| 7777精品伊人久久久大香线蕉经典版下载| 九九在线精品视频| 亚洲蜜臀av乱码久久精品蜜桃| 精品视频一区二区三区免费| 国产永久精品大片wwwapp| 亚洲综合av网| 国产视频一区二区在线观看| 欧美日韩免费电影| 成人自拍视频在线| 蜜桃在线一区二区三区| 最新欧美精品一区二区三区| 91精品国产综合久久香蕉的特点| 风间由美一区二区三区在线观看| 日韩av高清在线观看| 国产精品三级久久久久三级| 日韩久久精品一区| 日本道在线观看一区二区| 国产成人精品午夜视频免费| 不卡视频免费播放| 亚洲男人天堂av| 久久婷婷成人综合色| 欧美色视频在线观看| 97久久超碰国产精品电影| 极品瑜伽女神91| 三级在线观看一区二区 | 99热99精品| 国产一区在线视频| 免费在线成人网| 亚洲国产aⅴ天堂久久| 亚洲免费视频中文字幕| 中文字幕免费观看一区| 久久久蜜臀国产一区二区| 欧美一区二区免费观在线| 欧美三级日本三级少妇99| 91网站在线观看视频| 高清不卡一区二区在线| 精品亚洲成av人在线观看| 蜜臀av一区二区三区| 午夜精品久久久久久久| 一二三区精品福利视频| 亚洲欧洲美洲综合色网| 亚洲欧洲精品天堂一级| 国产日韩欧美电影| 国产三级精品视频| 久久精品在这里| 久久日韩精品一区二区五区| 久久综合av免费| 欧美精品一区二区三| 久久精品综合网| 国产精品无人区| 国产精品毛片高清在线完整版| 中文欧美字幕免费| 久久99精品国产麻豆不卡| 欧美aaaaa成人免费观看视频| 日本 国产 欧美色综合| 久久精品国产99| 久88久久88久久久| 国产.精品.日韩.另类.中文.在线.播放| 国产在线麻豆精品观看| 国产成人精品亚洲日本在线桃色 | 成人av综合在线| 91丨porny丨中文| 91免费在线播放| 欧美日韩日日骚| 欧美一区二区二区| 国产亚洲成av人在线观看导航| 国产精品久久久久影院老司| 亚洲精品视频免费看| 亚洲一区二区av在线| 偷拍自拍另类欧美| 国产一区二区三区四| 不卡的av电影| 欧美精品丝袜中出| 久久久精品日韩欧美| 亚洲欧美经典视频| 日韩精品91亚洲二区在线观看 | 中文字幕欧美一| 亚洲mv在线观看| 国产精品一色哟哟哟| 色婷婷综合五月| 欧美一区二区三区视频免费| 久久精品夜色噜噜亚洲aⅴ| 亚洲欧美福利一区二区| 蜜臀久久99精品久久久久久9| 国产精品一区一区| 色94色欧美sute亚洲线路二| 精品女同一区二区| 亚洲精品视频在线观看网站| 麻豆精品视频在线观看| 91麻豆高清视频| 欧美电影免费提供在线观看| 亚洲免费资源在线播放| 蜜桃视频免费观看一区| 99国内精品久久| 精品少妇一区二区三区| 国产精品国产三级国产普通话蜜臀| 亚洲成av人片观看| 成人午夜又粗又硬又大| 91精品国产91久久综合桃花| 亚洲人吸女人奶水| 国精品**一区二区三区在线蜜桃| 欧美专区亚洲专区| 国产精品久久久一区麻豆最新章节| 日本伊人色综合网| 91免费版在线| 国产日韩精品一区二区三区| 日本麻豆一区二区三区视频| 色一情一伦一子一伦一区| 国产清纯美女被跳蛋高潮一区二区久久w | 国产成人精品免费在线| 日韩欧美国产小视频| 亚洲国产视频一区二区| 99精品偷自拍| 国产精品嫩草影院com| 蜜臀久久久99精品久久久久久| 欧美在线视频日韩| 1024亚洲合集| 高清免费成人av| 精品日韩成人av| 秋霞av亚洲一区二区三| 精品视频在线看| 一区二区三区色| 色综合天天综合狠狠| 中文天堂在线一区| 国产精选一区二区三区| 精品国产一区二区三区不卡| 日韩激情一二三区| 欧美日韩高清在线| 亚欧色一区w666天堂| 在线免费观看日韩欧美| 亚洲精品国产第一综合99久久| www.性欧美| 亚洲天堂成人网| 91蜜桃视频在线| 1区2区3区国产精品| 91在线国内视频| 国产精品久久福利| 成人免费视频caoporn| 中文欧美字幕免费| 99久久久久久| 亚洲精品亚洲人成人网| 欧美综合一区二区三区| 午夜精品一区二区三区电影天堂 | 精品国产一区二区亚洲人成毛片| 秋霞电影网一区二区| 欧美白人最猛性xxxxx69交| 久久99精品久久久久婷婷| 26uuu亚洲综合色| 懂色av一区二区夜夜嗨| 国产精品久久久久三级| 91在线视频观看| 亚洲高清视频在线| 日韩一区二区免费视频| 国产精品自拍在线| 最新国产精品久久精品| 欧美丝袜自拍制服另类| 日本成人在线视频网站| 亚洲精品在线三区| 成人午夜在线播放| 亚洲制服丝袜av| 欧美一区二区免费视频| 国产91丝袜在线播放九色| 亚洲男人电影天堂| 欧美一区二区三区免费| 国产91综合一区在线观看| 一区二区在线观看视频| 日韩午夜精品电影| 成人激情动漫在线观看| 首页国产欧美久久| 国产午夜精品久久久久久久| 91丨porny丨中文| 老司机午夜精品| 亚洲色图色小说|