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

📄 dbmon.h

📁 Oracle C++ libary support Oracle Database 8,9i,10g
💻 H
字号:

#ifndef   __DBMonitorLib_TLB_h__
#define   __DBMonitorLib_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 Dbmonitorlib_tlb
{

// *********************************************************************//
// HelpString: DBMonitor 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_DBMonitorLib;
extern __declspec (package) const GUID GUID_TEventType;
extern __declspec (package) const GUID GUID_TTracePoint;
extern __declspec (package) const GUID GUID_TSQLParam;
extern __declspec (package) const GUID GUID_TMonitorMessage;
extern __declspec (package) const GUID GUID_PSQLParam;
extern __declspec (package) const GUID IID_IDBMonitor;
extern __declspec (package) const GUID CLSID_DBMonitor;

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
enum      TEventType;
enum      TTracePoint;
struct    TSQLParam;
struct    TMonitorMessage;
interface DECLSPEC_UUID("{89F49E64-F6E0-11D6-9038-00C02631BDC7}") IDBMonitor;
typedef TComInterface<IDBMonitor, &IID_IDBMonitor> IDBMonitorPtr;

// *********************************************************************//
// 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 IDBMonitor DBMonitor;
typedef IDBMonitorPtr DBMonitorPtr;

#define LIBID_OF_DBMonitor (&LIBID_DBMonitorLib)

// *********************************************************************//
// Declaration of Aliases defined in Type Library                         
// *********************************************************************//
typedef Dbmonitorlib_tlb::TSQLParam* PSQLParam;

// *********************************************************************//
// Declaration of Enumerations defined in Type Library                    
// *********************************************************************//
typedef enum TEventType
{
  et_Connect = 2, 
  et_Disconnect = 3, 
  et_Commit = 4, 
  et_Rollback = 5, 
  et_Prepare = 6, 
  et_Unprepare = 7, 
  et_Execute = 8, 
  et_Blob = 9, 
  et_Error = 10, 
  et_Misc = 11
} TEventType;

typedef enum TTracePoint
{
  tp_BeforeEvent = 0, 
  tp_AfterEvent = 1
} TTracePoint;


// *********************************************************************//
// Declaration of Structures and Unions defined in Type Library           
// *********************************************************************//
struct TSQLParam
{
  LPSTR Name;
  LPSTR DataType;
  LPSTR Paramtype;
  LPSTR Value;
};

struct TMonitorMessage
{
  long MessageID;
  Dbmonitorlib_tlb::TEventType EventType;
  Dbmonitorlib_tlb::TTracePoint TracePoint;
  long ObjectID;
  long OwnerID;
  LPSTR ObjectName;
  LPSTR OwnerName;
  LPSTR Description;
};

// *********************************************************************//
// Interface: IDBMonitor
// Flags:     (0)
// GUID:      {89F49E64-F6E0-11D6-9038-00C02631BDC7}
// *********************************************************************//
interface IDBMonitor  : public IUnknown
{
public:
  virtual HRESULT STDMETHODCALLTYPE GetVersion(LPSTR* pVersion/*[out]*/) = 0; // [-1]
  virtual HRESULT STDMETHODCALLTYPE SetCaption(LPSTR Caption/*[in]*/) = 0; // [-1]
  virtual HRESULT STDMETHODCALLTYPE IsMonitorActive(long* Active/*[out]*/) = 0; // [-1]
  virtual HRESULT STDMETHODCALLTYPE OnEvent(Dbmonitorlib_tlb::TMonitorMessage* Msg/*[in,out]*/, 
                                            LPSTR ParamStr/*[in]*/) = 0; // [-1]
  virtual HRESULT STDMETHODCALLTYPE OnExecute(Dbmonitorlib_tlb::TMonitorMessage* Msg/*[in,out]*/, 
                                              LPSTR SQL/*[in]*/, 
                                              Dbmonitorlib_tlb::TSQLParam Params[1000]/*[in]*/, 
                                              long ParamCount/*[in]*/, long RowsAffected/*[in]*/) = 0; // [-1]
};

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

  HRESULT         __fastcall GetVersion(LPSTR* pVersion/*[out]*/);
  HRESULT         __fastcall SetCaption(LPSTR Caption/*[in]*/);
  HRESULT         __fastcall IsMonitorActive(long* Active/*[out]*/);
  HRESULT         __fastcall OnEvent(Dbmonitorlib_tlb::TMonitorMessage* Msg/*[in,out]*/, 
                                     LPSTR ParamStr/*[in]*/);
  HRESULT         __fastcall OnExecute(Dbmonitorlib_tlb::TMonitorMessage* Msg/*[in,out]*/, 
                                       LPSTR SQL/*[in]*/, 
                                       Dbmonitorlib_tlb::TSQLParam Params[1000]/*[in]*/, 
                                       long ParamCount/*[in]*/, long RowsAffected/*[in]*/);

};
typedef TCOMIDBMonitorT<IDBMonitor> TCOMIDBMonitor;

// *********************************************************************//
// SmartIntf: TCOMIDBMonitor
// Interface: IDBMonitor
// *********************************************************************//
template <class T> HRESULT __fastcall
TCOMIDBMonitorT<T>::GetVersion(LPSTR* pVersion/*[out]*/)
{
  return (*this)->GetVersion(pVersion);
}

template <class T> HRESULT __fastcall
TCOMIDBMonitorT<T>::SetCaption(LPSTR Caption/*[in]*/)
{
  return (*this)->SetCaption(Caption);
}

template <class T> HRESULT __fastcall
TCOMIDBMonitorT<T>::IsMonitorActive(long* Active/*[out]*/)
{
  return (*this)->IsMonitorActive(Active);
}

template <class T> HRESULT __fastcall
TCOMIDBMonitorT<T>::OnEvent(Dbmonitorlib_tlb::TMonitorMessage* Msg/*[in,out]*/, 
                            LPSTR ParamStr/*[in]*/)
{
  return (*this)->OnEvent(Msg, ParamStr);
}

template <class T> HRESULT __fastcall
TCOMIDBMonitorT<T>::OnExecute(Dbmonitorlib_tlb::TMonitorMessage* Msg/*[in,out]*/, LPSTR SQL/*[in]*/, 
                              Dbmonitorlib_tlb::TSQLParam Params[1000]/*[in]*/, 
                              long ParamCount/*[in]*/, long RowsAffected/*[in]*/)
{
  return (*this)->OnExecute(Msg, SQL, Params, ParamCount, RowsAffected);
}

// *********************************************************************//
// 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  : DBMonitor
// Interface: TCOMIDBMonitor
// *********************************************************************//
typedef TCoClassCreatorT<TCOMIDBMonitor, IDBMonitor, &CLSID_DBMonitor, &IID_IDBMonitor> CoDBMonitor;
#endif  //   __TLB_NO_INTERFACE_WRAPPERS


};     // namespace Dbmonitorlib_tlb

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

#pragma option pop

#endif // __DBMonitorLib_TLB_h__

⌨️ 快捷键说明

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