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

📄 autoserv_tlb.h

📁 C++Builder高级应用开发指南随书源码
💻 H
字号:
// ************************************************************************ //
// 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.                                         
// ************************************************************************ //

// C++ TLBWRTR : $Revision:   1.134.1.41  $
// File generated on 2001-9-15 20:08:16 from Type Library described below.

// ************************************************************************ //
// Type Lib: C:\Samples\COM\AutoServ\AutoServ.tlb (1)
// IID\LCID: {F8811B05-EF2A-45F0-B0E6-F596E4357F27}\0
// Helpfile: 
// DepndLst: 
//   (1) v2.0 stdole, (E:\WINNT\System32\stdole2.tlb)
//   (2) v4.0 StdVCL, (E:\WINNT\System32\STDVCL40.DLL)
// ************************************************************************ //
#ifndef   __AutoServ_TLB_h__
#define   __AutoServ_TLB_h__

#pragma option push -b -w-inl

#include <utilcls.h>
#if !defined(__UTILCLS_H_VERSION) || (__UTILCLS_H_VERSION < 0x0500)
//
// The code generated by the TLIBIMP utility or the Import|TypeLibrary 
// and Import|ActiveX feature of C++Builder rely on specific versions of
// the header file UTILCLS.H found in the INCLUDE\VCL directory. If an 
// older version of the file is detected, you probably need an update/patch.
//
#error "This file requires a newer version of the header UTILCLS.H" \
       "You need to apply an update/patch to your copy of C++Builder"
#endif
#include <olectl.h>
#include <ocidl.h>
#if defined(USING_ATLVCL) || defined(USING_ATL)
#if !defined(__TLB_NO_EVENT_WRAPPERS)
#include <atl/atlmod.h>
#endif
#endif


// *********************************************************************//
// Forward reference of some VCL types (to avoid including STDVCL.HPP)    
// *********************************************************************//
namespace Stdvcl {class IStrings; class IStringsDisp;}
using namespace Stdvcl;
typedef TComInterface<IStrings> IStringsPtr;
typedef TComInterface<IStringsDisp> IStringsDispPtr;

namespace Autoserv_tlb
{

// *********************************************************************//
// HelpString: AutoServ Library
// Version:    1.0
// *********************************************************************//


// *********************************************************************//
// GUIDS declared in the TypeLibrary. Following prefixes are used:        
//   Type Libraries     : LIBID_xxxx                                      
//   CoClasses          : CLSID_xxxx                                      
//   DISPInterfaces     : DIID_xxxx                                       
//   Non-DISP interfaces: IID_xxxx                                        
// *********************************************************************//
extern __declspec (package) const GUID LIBID_AutoServ;
extern __declspec (package) const GUID IID_IMyAutoObj;
extern __declspec (package) const GUID DIID_IMyAutoObjEvents;
extern __declspec (package) const GUID CLSID_MyAutoObj;

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
interface DECLSPEC_UUID("{3306D73F-4AC3-42AE-8816-4407A429790C}") IMyAutoObj;
typedef TComInterface<IMyAutoObj, &IID_IMyAutoObj> IMyAutoObjPtr;
interface DECLSPEC_UUID("{1FA9FD01-FD01-4D9A-B115-CF58C542B207}") IMyAutoObjEvents;
typedef TComInterface<IMyAutoObjEvents, &DIID_IMyAutoObjEvents> IMyAutoObjEventsPtr;

// *********************************************************************//
// Declaration of CoClasses defined in Type Library                       
// (NOTE: Here we map each CoClass to its Default Interface)              
//                                                                        
// The LIBID_OF_ macro(s) map a LIBID_OF_CoClassName to the GUID of this  
// TypeLibrary. It simplifies the updating of macros when CoClass name    
// change.                                                                
// *********************************************************************//
typedef IMyAutoObj MyAutoObj;
typedef IMyAutoObjPtr MyAutoObjPtr;

#define LIBID_OF_MyAutoObj (&LIBID_AutoServ)
// *********************************************************************//
// Interface: IMyAutoObj
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {3306D73F-4AC3-42AE-8816-4407A429790C}
// *********************************************************************//
interface IMyAutoObj  : public IDispatch
{
public:
  virtual HRESULT STDMETHODCALLTYPE get_Text(long* Value/*[out,retval]*/) = 0; // [2]
  virtual HRESULT STDMETHODCALLTYPE set_Text(long Value/*[in]*/) = 0; // [2]

#if !defined(__TLB_NO_INTERFACE_WRAPPERS)

  long __fastcall get_Text(void)
  {
    long Value;
    OLECHECK(this->get_Text((long*)&Value));
    return Value;
  }


  __property   long            Text = {read = get_Text, write = set_Text};

#endif //   __TLB_NO_INTERFACE_WRAPPERS

};

// *********************************************************************//
// Interface: IMyAutoObjEvents
// Flags:     (0)
// GUID:      {1FA9FD01-FD01-4D9A-B115-CF58C542B207}
// *********************************************************************//
interface IMyAutoObjEvents : public TDispWrapper<IDispatch>
{

};
#if !defined(__TLB_NO_INTERFACE_WRAPPERS)
// *********************************************************************//
// SmartIntf: TCOMIMyAutoObj
// Interface: IMyAutoObj
// *********************************************************************//
template <class T /* IMyAutoObj */ >
class TCOMIMyAutoObjT : public TComInterface<IMyAutoObj>, public TComInterfaceBase<IUnknown>
{
public:
  TCOMIMyAutoObjT() {}
  TCOMIMyAutoObjT(IMyAutoObj *intf, bool addRef = false) : TComInterface<IMyAutoObj>(intf, addRef) {}
  TCOMIMyAutoObjT(const TCOMIMyAutoObjT& src) : TComInterface<IMyAutoObj>(src) {}
  TCOMIMyAutoObjT& operator=(const TCOMIMyAutoObjT& src) { Bind(src, true); return *this;}

  HRESULT         __fastcall get_Text(long* Value/*[out,retval]*/);
  long            __fastcall get_Text(void);
  HRESULT         __fastcall set_Text(long Value/*[in]*/);

  __property   long            Text = {read = get_Text, write = set_Text};
};
typedef TCOMIMyAutoObjT<IMyAutoObj> TCOMIMyAutoObj;

// *********************************************************************//
// DispIntf:  IMyAutoObj
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {3306D73F-4AC3-42AE-8816-4407A429790C}
// *********************************************************************//
template<class T>
class IMyAutoObjDispT : public TAutoDriver<IMyAutoObj>
{
public:
  IMyAutoObjDispT(){}

  IMyAutoObjDispT(IMyAutoObj *pintf)
  {
    TAutoDriver<IMyAutoObj>::Bind(pintf, false);
  }

  IMyAutoObjDispT(IMyAutoObjPtr pintf)
  {
    TAutoDriver<IMyAutoObj>::Bind(pintf, true);
  }

  IMyAutoObjDispT& operator=(IMyAutoObj *pintf)
  {
    TAutoDriver<IMyAutoObj>::Bind(pintf, false);
    return *this;
  }

  IMyAutoObjDispT& operator=(IMyAutoObjPtr pintf)
  {
    TAutoDriver<IMyAutoObj>::Bind(pintf, true);
    return *this;
  }

  HRESULT BindDefault()
  {
    return OLECHECK(Bind(CLSID_MyAutoObj));
  }

  HRESULT BindRunning()
  {
    return BindToActive(CLSID_MyAutoObj);
  }

  HRESULT         __fastcall get_Text(long* Value/*[out,retval]*/);
  long            __fastcall get_Text(void);
  HRESULT         __fastcall set_Text(long Value/*[in]*/);

  __property   long            Text = {read = get_Text, write = set_Text};
};
typedef IMyAutoObjDispT<IMyAutoObj> IMyAutoObjDisp;

// *********************************************************************//
// DispIntf:  IMyAutoObjEvents
// Flags:     (0)
// GUID:      {1FA9FD01-FD01-4D9A-B115-CF58C542B207}
// *********************************************************************//
template <class T>
class IMyAutoObjEventsDispT : public TAutoDriver<IMyAutoObjEvents>
{
public:
  IMyAutoObjEventsDispT(){}

  void Attach(LPUNKNOWN punk)
  { m_Dispatch = static_cast<T*>(punk); }


};
typedef IMyAutoObjEventsDispT<IMyAutoObjEvents> IMyAutoObjEventsDisp;

// *********************************************************************//
// SmartIntf: TCOMIMyAutoObj
// Interface: IMyAutoObj
// *********************************************************************//
template <class T> HRESULT __fastcall
TCOMIMyAutoObjT<T>::get_Text(long* Value/*[out,retval]*/)
{
  return (*this)->get_Text(Value);
}

template <class T> long __fastcall
TCOMIMyAutoObjT<T>::get_Text(void)
{
  long Value;
  OLECHECK(this->get_Text((long*)&Value));
  return Value;
}

template <class T> HRESULT __fastcall
TCOMIMyAutoObjT<T>::set_Text(long Value/*[in]*/)
{
  return (*this)->set_Text(Value);
}

// *********************************************************************//
// DispIntf:  IMyAutoObj
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {3306D73F-4AC3-42AE-8816-4407A429790C}
// *********************************************************************//
template <class T> HRESULT __fastcall
IMyAutoObjDispT<T>::get_Text(long* Value/*[out,retval]*/)
{
  _TDispID _dispid(*this, OLETEXT("Text"), DISPID(2));
  TAutoArgs<0> _args;
  return OutRetValSetterPtr(Value /*[VT_I4:1]*/, _args, OlePropertyGet(_dispid, _args));
}

template <class T> long __fastcall
IMyAutoObjDispT<T>::get_Text(void)
{
  long Value;
  this->get_Text((long*)&Value);
  return Value;
}

template <class T> HRESULT __fastcall
IMyAutoObjDispT<T>::set_Text(long Value/*[in]*/)
{
  _TDispID _dispid(*this, OLETEXT("Text"), DISPID(2));
  TAutoArgs<1> _args;
  _args[1] = Value /*[VT_I4:0]*/;
  return OlePropertyPut(_dispid, _args);
}

// *********************************************************************//
// DispIntf:  IMyAutoObjEvents
// Flags:     (0)
// GUID:      {1FA9FD01-FD01-4D9A-B115-CF58C542B207}
// *********************************************************************//
// *********************************************************************//
// The following typedefs expose classes (named CoCoClassName) that       
// provide static Create() and CreateRemote(LPWSTR machineName) methods   
// for creating an instance of an exposed object. These functions can     
// be used by client wishing to automate CoClasses exposed by this        
// typelibrary.                                                           
// *********************************************************************//

// *********************************************************************//
// COCLASS DEFAULT INTERFACE CREATOR
// CoClass  : MyAutoObj
// Interface: TCOMIMyAutoObj
// *********************************************************************//
typedef TCoClassCreatorT<TCOMIMyAutoObj, IMyAutoObj, &CLSID_MyAutoObj, &IID_IMyAutoObj> CoMyAutoObj;
#endif  //   __TLB_NO_INTERFACE_WRAPPERS


#if !defined(__TLB_NO_EVENT_WRAPPERS) && defined(USING_ATLVCL)
// *********************************************************************//
// CONNECTIONPOINT/EVENT PROXY
// CoClass         : MyAutoObj
// Event Interface : IMyAutoObjEvents
// *********************************************************************//
template <class T>
class TEvents_MyAutoObj : public IConnectionPointImpl<T,
                                                 &DIID_IMyAutoObjEvents,
                                                 CComUnkArray<CONNECTIONPOINT_ARRAY_SIZE> >
{
public:
protected:
  IMyAutoObjEventsDisp m_EventIntfObj;
};

#endif  //   __TLB_NO_EVENT_WRAPPERS

};     // namespace Autoserv_tlb

#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using  namespace Autoserv_tlb;
#endif

#pragma option pop

#endif // __AutoServ_TLB_h__

⌨️ 快捷键说明

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