博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
COM类型库---COM接口定义
阅读量:5883 次
发布时间:2019-06-19

本文共 7933 字,大约阅读时间需要 26 分钟。

unit MidServer_TLB;

// ************************************************************************ //

// WARNING                                                                   
// -------                                                                   
// The types declared in this file were generated from data read from a      
// Type Library. If this type library is explicitly or indirectly (via       
// another type library referring to this type library) re-imported, or the  
// 'Refresh' command of the Type Library Editor activated while editing the  
// Type Library, the contents of this file will be regenerated and all       
// manual modifications will be lost.                                        
// ************************************************************************ //

// PASTLWTR : 1.2

// File generated on 2012-01-11 23:08:49 from Type Library described below.

// ************************************************************************  //

// Type Lib: C:\Documents and Settings\Administrator\桌面\MadisSvr\server\MidServer.tlb (1)
// LIBID: {FB361C3B-65CD-4D88-B531-D554770F557A}
// LCID: 0
// Helpfile:
// HelpString: MidServer Library
// DepndLst:
//   (1) v1.0 Midas, (C:\WINDOWS\system32\midas.dll)
//   (2) v2.0 stdole, (C:\WINDOWS\system32\stdole2.tlb)
// ************************************************************************ //
{$TYPEDADDRESS OFF} // Unit must be compiled without type-checked pointers.
{$WARN SYMBOL_PLATFORM OFF}
{$WRITEABLECONST ON}
{$VARPROPSETTER ON}
interface

uses Windows, ActiveX, Classes, Graphics, Midas, StdVCL, Variants;

 

// *********************************************************************//

// GUIDS declared in the TypeLibrary. Following prefixes are used:       
//   Type Libraries     : LIBID_xxxx                                     
//   CoClasses          : CLASS_xxxx                                     
//   DISPInterfaces     : DIID_xxxx                                      
//   Non-DISP interfaces: IID_xxxx                                       
// *********************************************************************//
const
  // TypeLibrary Major and minor versions
  MidServerMajorVersion = 1;
  MidServerMinorVersion = 0;

  LIBID_MidServer: TGUID = '{FB361C3B-65CD-4D88-B531-D554770F557A}';

  IID_ITest: TGUID = '{9A4E798C-321F-441D-BA84-7DBA23D5B369}';

  CLASS_Test: TGUID = '{24FF8621-2B81-4F7F-B657-0B33F7139B9F}';
type

// *********************************************************************//

// Forward declaration of types defined in TypeLibrary                   
// *********************************************************************//
  ITest = interface;
  ITestDisp = dispinterface;

// *********************************************************************//

// Declaration of CoClasses defined in Type Library                      
// (NOTE: Here we map each CoClass to its Default Interface)             
// *********************************************************************//
  Test = ITest;

// *********************************************************************//
// Interface: ITest
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {9A4E798C-321F-441D-BA84-7DBA23D5B369}
// *********************************************************************//
  ITest = interface(IAppServer)
    ['{9A4E798C-321F-441D-BA84-7DBA23D5B369}']
    function GetDateTime: TDateTime; safecall;
    function QryData(const ModuleId: WideString; SqlId: Shortint; Params: OleVariant): OleVariant; safecall;
    function ExecSQL(const ModuleId: WideString; SqlId: Shortint; Params: OleVariant): Shortint; safecall;
    function GetStoredData(const ModuleId: WideString; SqlId: Shortint; Params: OleVariant): OleVariant; safecall;
    function ExecStored(const ModuleId: WideString; SqlId: Shortint; Params: OleVariant): Shortint; safecall;
    function ApplyUpdate(const ModuleId: WideString; SqlId: Shortint; Delta: OleVariant): Shortint; safecall;
    function DownloadFile(const FileName: WideString): OleVariant; safecall;
    function GetDate: TDateTime; safecall;
    function GetFieldsDef(const ModuleId: WideString; SqlId: Shortint): OleVariant; safecall;
    function GetCaptions(const ModuleId: WideString): OleVariant; safecall;
    function ApplyUpdates(const ModuleId: WideString; SqlId: Shortint; Delta0: OleVariant;
                          Delta1: OleVariant; Delta2: OleVariant; Delta3: OleVariant): Shortint; safecall;
    function ChangePassword(const UserId: WideString; const OldPassword: WideString;
                            const NewPassword: WideString): Shortint; safecall;
    function CheckUser(const UserId: WideString; const Password: WideString): Shortint; safecall;
    function GetRights(const UserId: WideString; const ModuleId: WideString): OleVariant; safecall;
  end;

// *********************************************************************//

// DispIntf:  ITestDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {9A4E798C-321F-441D-BA84-7DBA23D5B369}
// *********************************************************************//
  ITestDisp = dispinterface
    ['{9A4E798C-321F-441D-BA84-7DBA23D5B369}']
    function GetDateTime: TDateTime; dispid 304;
    function QryData(const ModuleId: WideString; SqlId: {??Shortint}OleVariant; Params: OleVariant): OleVariant; dispid 305;
    function ExecSQL(const ModuleId: WideString; SqlId: {??Shortint}OleVariant; Params: OleVariant): {??Shortint}OleVariant; dispid 306;
    function GetStoredData(const ModuleId: WideString; SqlId: {??Shortint}OleVariant;
                           Params: OleVariant): OleVariant; dispid 309;
    function ExecStored(const ModuleId: WideString; SqlId: {??Shortint}OleVariant;
                        Params: OleVariant): {??Shortint}OleVariant; dispid 310;
    function ApplyUpdate(const ModuleId: WideString; SqlId: {??Shortint}OleVariant;
                         Delta: OleVariant): {??Shortint}OleVariant; dispid 312;
    function DownloadFile(const FileName: WideString): OleVariant; dispid 314;
    function GetDate: TDateTime; dispid 315;
    function GetFieldsDef(const ModuleId: WideString; SqlId: {??Shortint}OleVariant): OleVariant; dispid 316;
    function GetCaptions(const ModuleId: WideString): OleVariant; dispid 301;
    function ApplyUpdates(const ModuleId: WideString; SqlId: {??Shortint}OleVariant;
                          Delta0: OleVariant; Delta1: OleVariant; Delta2: OleVariant;
                          Delta3: OleVariant): {??Shortint}OleVariant; dispid 302;
    function ChangePassword(const UserId: WideString; const OldPassword: WideString;
                            const NewPassword: WideString): {??Shortint}OleVariant; dispid 303;
    function CheckUser(const UserId: WideString; const Password: WideString): {??Shortint}OleVariant; dispid 307;
    function GetRights(const UserId: WideString; const ModuleId: WideString): OleVariant; dispid 308;
    function AS_ApplyUpdates(const ProviderName: WideString; Delta: OleVariant; MaxErrors: Integer;
                             out ErrorCount: Integer; var OwnerData: OleVariant): OleVariant; dispid 20000000;
    function AS_GetRecords(const ProviderName: WideString; Count: Integer; out RecsOut: Integer;
                           Options: Integer; const CommandText: WideString; var Params: OleVariant;
                           var OwnerData: OleVariant): OleVariant; dispid 20000001;
    function AS_DataRequest(const ProviderName: WideString; Data: OleVariant): OleVariant; dispid 20000002;
    function AS_GetProviderNames: OleVariant; dispid 20000003;
    function AS_GetParams(const ProviderName: WideString; var OwnerData: OleVariant): OleVariant; dispid 20000004;
    function AS_RowRequest(const ProviderName: WideString; Row: OleVariant; RequestType: Integer;
                           var OwnerData: OleVariant): OleVariant; dispid 20000005;
    procedure AS_Execute(const ProviderName: WideString; const CommandText: WideString;
                         var Params: OleVariant; var OwnerData: OleVariant); dispid 20000006;
  end;

// *********************************************************************//

// The Class CoTest provides a Create and CreateRemote method to         
// create instances of the default interface ITest exposed by             
// the CoClass Test. The functions are intended to be used by            
// clients wishing to automate the CoClass objects exposed by the        
// server of this typelibrary.                                           
// *********************************************************************//
  CoTest = class
    class function Create: ITest;
    class function CreateRemote(const MachineName: string): ITest;
  end;

implementation

uses ComObj;

class function CoTest.Create: ITest;

begin
  Result := CreateComObject(CLASS_Test) as ITest;
end;

class function CoTest.CreateRemote(const MachineName: string): ITest;

begin
  Result := CreateRemoteComObject(MachineName, CLASS_Test) as ITest;
end;

end.

转载地址:http://vipix.baihongyu.com/

你可能感兴趣的文章
自己动手——实现Dustjs中间件
查看>>
勘误表《网络规划设计师考试考点分析与真题详解》
查看>>
Flask 使用小结【Updating】
查看>>
详解 Windows 下 Eclipse CDT 配置 C/C++ 编译环境
查看>>
jQuery实现spliter效果
查看>>
Jquery实现正文部分根据浏览器大小自适应高度
查看>>
启动服务成功后OK对齐显示(函数调用)
查看>>
Powershell AS-HTTP-Activation 無效(咋整?)
查看>>
右击项添加cmd命令窗口
查看>>
Autofs自动挂载服务
查看>>
python的升级
查看>>
springmvc工具类封装RowMapper
查看>>
Django开发运维后台(三):利用ListView分页显示数据
查看>>
spring
查看>>
Python对进程Multiprocessing子进程返回值
查看>>
tomcat下java.io.NotSerializableException错误的解决方法
查看>>
Python入门之函数式开发
查看>>
IOS配置SSH一定需要先配置hostname和domain-name吗?
查看>>
java基础第十二天
查看>>
Django之MTV
查看>>