📄 comserver_tlb.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.151.1.0.1.27 $
// File generated on 2004-12-10 16:38:56 from Type Library described below.
// ************************************************************************ //
// Type Lib: D:\Program Files\Borland\CBuilder6\Projects\ComServer.tlb (1)
// LIBID: {976C81A4-FB45-4040-96FB-1945B74C0E9D}
// LCID: 0
// Helpfile:
// HelpString: ComServer Library
// DepndLst:
// (1) v2.0 stdole, (D:\WINDOWS\System32\stdole2.tlb)
// ************************************************************************ //
#ifndef ComServer_TLBH
#define ComServer_TLBH
#pragma option push -b -w-inl
#include <utilcls.h>
#if !defined(__UTILCLS_H_VERSION) || (__UTILCLS_H_VERSION < 0x0600)
//
// 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 Comserver_tlb
{
// *********************************************************************//
// HelpString: ComServer 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 "C" const __declspec(selectany) GUID LIBID_ComServer = {0x976C81A4, 0xFB45, 0x4040,{ 0x96, 0xFB, 0x19,0x45, 0xB7, 0x4C,0x0E, 0x9D} };
extern "C" const __declspec(selectany) GUID IID_IMyComClass = {0xDFDBCB15, 0x2E70, 0x4072,{ 0xA0, 0x21, 0x5A,0x5A, 0x48, 0xCA,0x45, 0xEE} };
extern "C" const __declspec(selectany) GUID CLSID_MyComClass = {0x840B9BBA, 0x3B40, 0x4169,{ 0xA8, 0xE1, 0x13,0x94, 0x30, 0xA9,0xF9, 0x03} };
// *********************************************************************//
// Forward declaration of types defined in TypeLibrary
// *********************************************************************//
interface DECLSPEC_UUID("{DFDBCB15-2E70-4072-A021-5A5A48CA45EE}") IMyComClass;
typedef TComInterface<IMyComClass, &IID_IMyComClass> IMyComClassPtr;
// *********************************************************************//
// 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 IMyComClass MyComClass;
typedef IMyComClassPtr MyComClassPtr;
#define LIBID_OF_MyComClass (&LIBID_ComServer)
// *********************************************************************//
// Interface: IMyComClass
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {DFDBCB15-2E70-4072-A021-5A5A48CA45EE}
// *********************************************************************//
interface IMyComClass : public IDispatch
{
public:
virtual HRESULT STDMETHODCALLTYPE get_Property1(BSTR* Value/*[out,retval]*/) = 0; // [2]
virtual HRESULT STDMETHODCALLTYPE set_Property1(BSTR Value/*[in]*/) = 0; // [2]
#if !defined(__TLB_NO_INTERFACE_WRAPPERS)
BSTR __fastcall get_Property1(void)
{
BSTR Value = 0;
OLECHECK(this->get_Property1((BSTR*)&Value));
return Value;
}
__property BSTR Property1 = {read = get_Property1};
#endif // __TLB_NO_INTERFACE_WRAPPERS
};
#if !defined(__TLB_NO_INTERFACE_WRAPPERS)
// *********************************************************************//
// SmartIntf: TCOMIMyComClass
// Interface: IMyComClass
// *********************************************************************//
template <class T /* IMyComClass */ >
class TCOMIMyComClassT : public TComInterface<IMyComClass>, public TComInterfaceBase<IUnknown>
{
public:
TCOMIMyComClassT() {}
TCOMIMyComClassT(IMyComClass *intf, bool addRef = false) : TComInterface<IMyComClass>(intf, addRef) {}
TCOMIMyComClassT(const TCOMIMyComClassT& src) : TComInterface<IMyComClass>(src) {}
TCOMIMyComClassT& operator=(const TCOMIMyComClassT& src) { Bind(src, true); return *this;}
HRESULT __fastcall get_Property1(BSTR* Value/*[out,retval]*/);
BSTR __fastcall get_Property1(void);
HRESULT __fastcall set_Property1(BSTR Value/*[in]*/);
__property BSTR Property1 = {read = get_Property1};
};
typedef TCOMIMyComClassT<IMyComClass> TCOMIMyComClass;
// *********************************************************************//
// DispIntf: IMyComClass
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {DFDBCB15-2E70-4072-A021-5A5A48CA45EE}
// *********************************************************************//
template<class T>
class IMyComClassDispT : public TAutoDriver<IMyComClass>
{
public:
IMyComClassDispT(){}
IMyComClassDispT(IMyComClass *pintf)
{
TAutoDriver<IMyComClass>::Bind(pintf, false);
}
IMyComClassDispT(IMyComClassPtr pintf)
{
TAutoDriver<IMyComClass>::Bind(pintf, true);
}
IMyComClassDispT& operator=(IMyComClass *pintf)
{
TAutoDriver<IMyComClass>::Bind(pintf, false);
return *this;
}
IMyComClassDispT& operator=(IMyComClassPtr pintf)
{
TAutoDriver<IMyComClass>::Bind(pintf, true);
return *this;
}
HRESULT BindDefault()
{
return OLECHECK(Bind(CLSID_MyComClass));
}
HRESULT BindRunning()
{
return BindToActive(CLSID_MyComClass);
}
HRESULT __fastcall get_Property1(BSTR* Value/*[out,retval]*/);
BSTR __fastcall get_Property1(void);
HRESULT __fastcall set_Property1(BSTR Value/*[in]*/);
__property BSTR Property1 = {read = get_Property1};
};
typedef IMyComClassDispT<IMyComClass> IMyComClassDisp;
// *********************************************************************//
// SmartIntf: TCOMIMyComClass
// Interface: IMyComClass
// *********************************************************************//
template <class T> HRESULT __fastcall
TCOMIMyComClassT<T>::get_Property1(BSTR* Value/*[out,retval]*/)
{
return (*this)->get_Property1(Value);
}
template <class T> BSTR __fastcall
TCOMIMyComClassT<T>::get_Property1(void)
{
BSTR Value = 0;
OLECHECK(this->get_Property1((BSTR*)&Value));
return Value;
}
template <class T> HRESULT __fastcall
TCOMIMyComClassT<T>::set_Property1(BSTR Value/*[in]*/)
{
return (*this)->set_Property1(Value);
}
// *********************************************************************//
// DispIntf: IMyComClass
// Flags: (4416) Dual OleAutomation Dispatchable
// GUID: {DFDBCB15-2E70-4072-A021-5A5A48CA45EE}
// *********************************************************************//
template <class T> HRESULT __fastcall
IMyComClassDispT<T>::get_Property1(BSTR* Value/*[out,retval]*/)
{
_TDispID _dispid(*this, OLETEXT("Property1"), DISPID(2));
TAutoArgs<0> _args;
return OutRetValSetterPtr(Value /*[VT_BSTR:1]*/, _args, OlePropertyGet(_dispid, _args));
}
template <class T> BSTR __fastcall
IMyComClassDispT<T>::get_Property1(void)
{
BSTR Value;
this->get_Property1((BSTR*)&Value);
return Value;
}
template <class T> HRESULT __fastcall
IMyComClassDispT<T>::set_Property1(BSTR Value/*[in]*/)
{
_TDispID _dispid(*this, OLETEXT("Property1"), DISPID(2));
TAutoArgs<1> _args;
_args[1] = Value /*[VT_BSTR:0]*/;
return OlePropertyPut(_dispid, _args);
}
// *********************************************************************//
// 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 : MyComClass
// Interface: TCOMIMyComClass
// *********************************************************************//
typedef TCoClassCreatorT<TCOMIMyComClass, IMyComClass, &CLSID_MyComClass, &IID_IMyComClass> CoMyComClass;
#endif // __TLB_NO_INTERFACE_WRAPPERS
}; // namespace Comserver_tlb
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Comserver_tlb;
#endif
#pragma option pop
#endif // ComServer_TLBH
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -