⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 serverapp_tlb.pas

📁 Delphi 7组件与分布式应用开发源码,介绍了基础的组件应用实例
💻 PAS
字号:
unit ServerApp_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 2002-11-19 20:54:12 from Type Library described below.

// ************************************************************************  //
// Type Lib: F:\wyd\work\sample\sample6-3\ServerApp.tlb (1)
// LIBID: {CC03BE3C-DD7B-4DD0-8F84-7D87D77ACD14}
// LCID: 0
// Helpfile: 
// HelpString: ServerApp Library
// DepndLst: 
//   (1) v2.0 stdole, (C:\WINNT\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, 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
  ServerAppMajorVersion = 1;
  ServerAppMinorVersion = 0;

  LIBID_ServerApp: TGUID = '{CC03BE3C-DD7B-4DD0-8F84-7D87D77ACD14}';

  IID_IComPlus: TGUID = '{7B80E285-A730-4AB7-86BC-E9E5429AE52F}';
  CLASS_ComPlus: TGUID = '{1F2AF333-FEA3-4F36-9423-D7F3CFB55912}';
type

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
  IComPlus = interface;
  IComPlusDisp = dispinterface;

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


// *********************************************************************//
// Interface: IComPlus
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {7B80E285-A730-4AB7-86BC-E9E5429AE52F}
// *********************************************************************//
  IComPlus = interface(IDispatch)
    ['{7B80E285-A730-4AB7-86BC-E9E5429AE52F}']
    function Login(const sName: WideString; const sPassword: WideString): Shortint; safecall;
    function Search(number1: Integer; number2: Integer): Integer; safecall;
  end;

// *********************************************************************//
// DispIntf:  IComPlusDisp
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {7B80E285-A730-4AB7-86BC-E9E5429AE52F}
// *********************************************************************//
  IComPlusDisp = dispinterface
    ['{7B80E285-A730-4AB7-86BC-E9E5429AE52F}']
    function Login(const sName: WideString; const sPassword: WideString): {??Shortint}OleVariant; dispid 1;
    function Search(number1: Integer; number2: Integer): Integer; dispid 2;
  end;

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

implementation

uses ComObj;

class function CoComPlus.Create: IComPlus;
begin
  Result := CreateComObject(CLASS_ComPlus) as IComPlus;
end;

class function CoComPlus.CreateRemote(const MachineName: string): IComPlus;
begin
  Result := CreateRemoteComObject(MachineName, CLASS_ComPlus) as IComPlus;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -