{ *********************************************************************** }
{                                                                         }
{ Delphi Visual Component Library                                         }
{                                                                         }
{ Copyright (c) 1995-2004 Borland Software Corporation                    }
{                                                                         }
{ *********************************************************************** }

unit Borland.Vcl.Midas platform;

interface

uses
  System.Runtime.InteropServices, Variants, DsIntf;

const
  LIBID_Midas: string = '83F57D68-CA9A-11D2-9088-00C04FA35CFA';
  IID_IAppServer      = '1AEFCC20-7A24-11D2-98B0-C69BEB4B5B6D';

type
{$M+}
  [ComImport,
  GuidAttribute(IID_IAppServer),
  InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual)]
  IAppServer = interface
    function AS_ApplyUpdates(const ProviderName: WideString; Delta: OleVariant;
      MaxErrors: Integer; out ErrorCount: Integer; var OwnerData: OleVariant): OleVariant;
    function AS_GetRecords(const ProviderName: WideString; Count: Integer;
      out RecsOut: Integer; Options: Integer; const CommandText: WideString;
      var Params: OleVariant; var OwnerData: OleVariant): TVarArrayData;
    function AS_DataRequest(const ProviderName: WideString; Data: OleVariant): OleVariant;
    function AS_GetProviderNames: OleVariant;
    function AS_GetParams(const ProviderName: WideString; var OwnerData: OleVariant): OleVariant;
    function AS_RowRequest(const ProviderName: WideString; Row: OleVariant;
      RequestType: Integer; var OwnerData: OleVariant): OleVariant;
    procedure AS_Execute(const ProviderName: WideString; const CommandText: WideString;
      var Params: OleVariant; var OwnerData: OleVariant);
  end;
{$M-}

  [ComImport,
  GuidAttribute(IID_IAppServer),
  InterfaceTypeAttribute(ComInterfaceType.InterfaceIsDual)]
  IAppServerDisp = interface
    [dispid(20000000)]
    function AS_ApplyUpdates(const ProviderName: WideString; Delta: OleVariant;
      MaxErrors: Integer; out ErrorCount: Integer; var OwnerData: OleVariant): OleVariant;
    [dispid(20000001)]
    function AS_GetRecords(const ProviderName: WideString; Count: Integer;
      out RecsOut: Integer; Options: Integer; const CommandText: WideString;
      var Params: OleVariant; var OwnerData: OleVariant): TVarArrayData;
    [dispid(20000002)]
    function AS_DataRequest(const ProviderName: WideString; Data: OleVariant): OleVariant;
    [dispid(20000003)]
    function AS_GetProviderNames: OleVariant;
    [dispid(20000004)]
    function AS_GetParams(const ProviderName: WideString; var OwnerData: OleVariant): OleVariant;
    [dispid(20000005)]
    function AS_RowRequest(const ProviderName: WideString; Row: OleVariant;
      RequestType: Integer; var OwnerData: OleVariant): OleVariant;
    [dispid(20000006)]
    procedure AS_Execute(const ProviderName: WideString; const CommandText: WideString;
      var Params: OleVariant; var OwnerData: OleVariant);
  end;

implementation

end.
