// ************************************************************************ //
// 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 2006-4-5 18:49:48 from Type Library described below.

// ************************************************************************  //
// Type Lib: C:\Program Files\Borland\CBuilder6\Projects\Example12_1\Server\AppServer.tlb (1)
// LIBID: {916C91E9-E8AC-4E37-9A51-E2F82F12CAF7}
// LCID: 0
// Helpfile: 
// HelpString: AppServer Library
// DepndLst: 
//   (1) v2.0 stdole, (C:\WINDOWS\System32\Stdole2.tlb)
//   (2) v1.0 Midas, (E:\ÁªÏëÇý¶¯³ÌÐò\setup\midas.dll)
// ************************************************************************ //
#ifndef   AppServer_TLBH
#define   AppServer_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

#include "databkr.hpp"

using Midas::IAppServer;

// *********************************************************************//
// 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 Appserver_tlb
{

// *********************************************************************//
// HelpString: AppServer 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_AppServer = {0x916C91E9, 0xE8AC, 0x4E37,{ 0x9A, 0x51, 0xE2,0xF8, 0x2F, 0x12,0xCA, 0xF7} };
extern "C" const __declspec(selectany) GUID IID_IAppServer1 = {0xCCE2353E, 0xE482, 0x4531,{ 0x98, 0x9D, 0x9F,0x68, 0x99, 0xEE,0x7B, 0x12} };
extern "C" const __declspec(selectany) GUID CLSID_AppServer1 = {0x60A01E5C, 0x6FD4, 0x4F18,{ 0x8E, 0x99, 0xD2,0xFE, 0x22, 0x96,0x15, 0x6F} };

// *********************************************************************//
// Forward declaration of types defined in TypeLibrary                    
// *********************************************************************//
interface DECLSPEC_UUID("{CCE2353E-E482-4531-989D-9F6899EE7B12}") IAppServer1;
typedef TComInterface<IAppServer1, &IID_IAppServer1> IAppServer1Ptr;


// *********************************************************************//
// 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.                                                                
// *********************************************************************//

#define LIBID_OF_AppServer1 (&LIBID_AppServer)
// *********************************************************************//
// Interface: IAppServer1
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {CCE2353E-E482-4531-989D-9F6899EE7B12}
// *********************************************************************//
interface IAppServer1  : public IAppServer
{
public:

#if !defined(__TLB_NO_INTERFACE_WRAPPERS)



#endif //   __TLB_NO_INTERFACE_WRAPPERS

};

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


};
typedef TCOMIAppServer1T<IAppServer1> TCOMIAppServer1;

// *********************************************************************//
// DispIntf:  IAppServer1
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {CCE2353E-E482-4531-989D-9F6899EE7B12}
// *********************************************************************//
template<class T>
class IAppServer1DispT : public TAutoDriver<IAppServer1>
{
public:
  IAppServer1DispT(){}

  IAppServer1DispT(IAppServer1 *pintf)
  {
    TAutoDriver<IAppServer1>::Bind(pintf, false);
  }

  IAppServer1DispT(IAppServer1Ptr pintf)
  {
    TAutoDriver<IAppServer1>::Bind(pintf, true);
  }

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

  IAppServer1DispT& operator=(IAppServer1Ptr pintf)
  {
    TAutoDriver<IAppServer1>::Bind(pintf, true);
    return *this;
  }

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

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

  HRESULT         __fastcall AS_ApplyUpdates(BSTR ProviderName/*[in]*/, VARIANT Delta/*[in]*/, 
                                             long MaxErrors/*[in]*/, long* ErrorCount/*[out]*/, 
                                             VARIANT* OwnerData/*[in,out]*/, 
                                             VARIANT* Value/*[out,retval]*/);
  VARIANT         __fastcall AS_ApplyUpdates(BSTR ProviderName/*[in]*/, VARIANT Delta/*[in]*/, 
                                             long MaxErrors/*[in]*/, long* ErrorCount/*[out]*/, 
                                             VARIANT* OwnerData/*[in,out]*/);
  HRESULT         __fastcall AS_GetRecords(BSTR ProviderName/*[in]*/, long Count/*[in]*/, 
                                           long* RecsOut/*[out]*/, long Options/*[in]*/, 
                                           BSTR CommandText/*[in]*/, VARIANT* Params/*[in,out]*/, 
                                           VARIANT* OwnerData/*[in,out]*/, 
                                           VARIANT* Value/*[out,retval]*/);
  VARIANT         __fastcall AS_GetRecords(BSTR ProviderName/*[in]*/, long Count/*[in]*/, 
                                           long* RecsOut/*[out]*/, long Options/*[in]*/, 
                                           BSTR CommandText/*[in]*/, VARIANT* Params/*[in,out]*/, 
                                           VARIANT* OwnerData/*[in,out]*/);
  HRESULT         __fastcall AS_DataRequest(BSTR ProviderName/*[in]*/, VARIANT Data/*[in]*/, 
                                            VARIANT* Value/*[out,retval]*/);
  VARIANT         __fastcall AS_DataRequest(BSTR ProviderName/*[in]*/, VARIANT Data/*[in]*/);
  HRESULT         __fastcall AS_GetProviderNames(VARIANT* Value/*[out,retval]*/);
  VARIANT         __fastcall AS_GetProviderNames(void);
  HRESULT         __fastcall AS_GetParams(BSTR ProviderName/*[in]*/, VARIANT* OwnerData/*[in,out]*/
                                          , VARIANT* Value/*[out,retval]*/);
  VARIANT         __fastcall AS_GetParams(BSTR ProviderName/*[in]*/, VARIANT* OwnerData/*[in,out]*/);
  HRESULT         __fastcall AS_RowRequest(BSTR ProviderName/*[in]*/, VARIANT Row/*[in]*/, 
                                           long RequestType/*[in]*/, VARIANT* OwnerData/*[in,out]*/
                                           , VARIANT* Value/*[out,retval]*/);
  VARIANT         __fastcall AS_RowRequest(BSTR ProviderName/*[in]*/, VARIANT Row/*[in]*/, 
                                           long RequestType/*[in]*/, VARIANT* OwnerData/*[in,out]*/);
  HRESULT         __fastcall AS_Execute(BSTR ProviderName/*[in]*/, BSTR CommandText/*[in]*/, 
                                        VARIANT* Params/*[in,out]*/, VARIANT* OwnerData/*[in,out]*/);


};
typedef IAppServer1DispT<IAppServer1> IAppServer1Disp;

// *********************************************************************//
// SmartIntf: TCOMIAppServer1
// Interface: IAppServer1
// *********************************************************************//
// *********************************************************************//
// DispIntf:  IAppServer1
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {CCE2353E-E482-4531-989D-9F6899EE7B12}
// *********************************************************************//
template <class T> HRESULT __fastcall
IAppServer1DispT<T>::AS_ApplyUpdates(BSTR ProviderName/*[in]*/, VARIANT Delta/*[in]*/, 
                                     long MaxErrors/*[in]*/, long* ErrorCount/*[out]*/, 
                                     VARIANT* OwnerData/*[in,out]*/, VARIANT* Value/*[out,retval]*/)
{
  _TDispID _dispid(*this, OLETEXT("AS_ApplyUpdates"), DISPID(20000000));
  TAutoArgs<5> _args;
  _args[1] = ProviderName /*[VT_BSTR:0]*/;
  _args[2] = Delta /*[VT_VARIANT:0]*/;
  _args[3] = MaxErrors /*[VT_I4:0]*/;
  _args[4] = ErrorCount /*[VT_I4:1]*/;
  _args[5] = OwnerData /*[VT_VARIANT:1]*/;
  return OutRetValSetterPtr(Value /*[VT_VARIANT:1]*/, _args, OleFunction(_dispid, _args));
}

template <class T> VARIANT __fastcall
IAppServer1DispT<T>::AS_ApplyUpdates(BSTR ProviderName/*[in]*/, VARIANT Delta/*[in]*/, 
                                     long MaxErrors/*[in]*/, long* ErrorCount/*[out]*/, 
                                     VARIANT* OwnerData/*[in,out]*/)
{
  VARIANT Value;
  this->AS_ApplyUpdates(ProviderName, Delta, MaxErrors, ErrorCount, OwnerData, (VARIANT*)&Value);
  return Value;
}

template <class T> HRESULT __fastcall
IAppServer1DispT<T>::AS_GetRecords(BSTR ProviderName/*[in]*/, long Count/*[in]*/, 
                                   long* RecsOut/*[out]*/, long Options/*[in]*/, 
                                   BSTR CommandText/*[in]*/, VARIANT* Params/*[in,out]*/, 
                                   VARIANT* OwnerData/*[in,out]*/, VARIANT* Value/*[out,retval]*/)
{
  _TDispID _dispid(*this, OLETEXT("AS_GetRecords"), DISPID(20000001));
  TAutoArgs<7> _args;
  _args[1] = ProviderName /*[VT_BSTR:0]*/;
  _args[2] = Count /*[VT_I4:0]*/;
  _args[3] = RecsOut /*[VT_I4:1]*/;
  _args[4] = Options /*[VT_I4:0]*/;
  _args[5] = CommandText /*[VT_BSTR:0]*/;
  _args[6] = Params /*[VT_VARIANT:1]*/;
  _args[7] = OwnerData /*[VT_VARIANT:1]*/;
  return OutRetValSetterPtr(Value /*[VT_VARIANT:1]*/, _args, OleFunction(_dispid, _args));
}

template <class T> VARIANT __fastcall
IAppServer1DispT<T>::AS_GetRecords(BSTR ProviderName/*[in]*/, long Count/*[in]*/, 
                                   long* RecsOut/*[out]*/, long Options/*[in]*/, 
                                   BSTR CommandText/*[in]*/, VARIANT* Params/*[in,out]*/, 
                                   VARIANT* OwnerData/*[in,out]*/)
{
  VARIANT Value;
  this->AS_GetRecords(ProviderName, Count, RecsOut, Options, CommandText, Params, OwnerData, (VARIANT*)&Value);
  return Value;
}

template <class T> HRESULT __fastcall
IAppServer1DispT<T>::AS_DataRequest(BSTR ProviderName/*[in]*/, VARIANT Data/*[in]*/, 
                                    VARIANT* Value/*[out,retval]*/)
{
  _TDispID _dispid(*this, OLETEXT("AS_DataRequest"), DISPID(20000002));
  TAutoArgs<2> _args;
  _args[1] = ProviderName /*[VT_BSTR:0]*/;
  _args[2] = Data /*[VT_VARIANT:0]*/;
  return OutRetValSetterPtr(Value /*[VT_VARIANT:1]*/, _args, OleFunction(_dispid, _args));
}

template <class T> VARIANT __fastcall
IAppServer1DispT<T>::AS_DataRequest(BSTR ProviderName/*[in]*/, VARIANT Data/*[in]*/)
{
  VARIANT Value;
  this->AS_DataRequest(ProviderName, Data, (VARIANT*)&Value);
  return Value;
}

template <class T> HRESULT __fastcall
IAppServer1DispT<T>::AS_GetProviderNames(VARIANT* Value/*[out,retval]*/)
{
  _TDispID _dispid(*this, OLETEXT("AS_GetProviderNames"), DISPID(20000003));
  TAutoArgs<0> _args;
  return OutRetValSetterPtr(Value /*[VT_VARIANT:1]*/, _args, OleFunction(_dispid, _args));
}

template <class T> VARIANT __fastcall
IAppServer1DispT<T>::AS_GetProviderNames(void)
{
  VARIANT Value;
  this->AS_GetProviderNames((VARIANT*)&Value);
  return Value;
}

template <class T> HRESULT __fastcall
IAppServer1DispT<T>::AS_GetParams(BSTR ProviderName/*[in]*/, VARIANT* OwnerData/*[in,out]*/, 
                                  VARIANT* Value/*[out,retval]*/)
{
  _TDispID _dispid(*this, OLETEXT("AS_GetParams"), DISPID(20000004));
  TAutoArgs<2> _args;
  _args[1] = ProviderName /*[VT_BSTR:0]*/;
  _args[2] = OwnerData /*[VT_VARIANT:1]*/;
  return OutRetValSetterPtr(Value /*[VT_VARIANT:1]*/, _args, OleFunction(_dispid, _args));
}

template <class T> VARIANT __fastcall
IAppServer1DispT<T>::AS_GetParams(BSTR ProviderName/*[in]*/, VARIANT* OwnerData/*[in,out]*/)
{
  VARIANT Value;
  this->AS_GetParams(ProviderName, OwnerData, (VARIANT*)&Value);
  return Value;
}

template <class T> HRESULT __fastcall
IAppServer1DispT<T>::AS_RowRequest(BSTR ProviderName/*[in]*/, VARIANT Row/*[in]*/, 
                                   long RequestType/*[in]*/, VARIANT* OwnerData/*[in,out]*/, 
                                   VARIANT* Value/*[out,retval]*/)
{
  _TDispID _dispid(*this, OLETEXT("AS_RowRequest"), DISPID(20000005));
  TAutoArgs<4> _args;
  _args[1] = ProviderName /*[VT_BSTR:0]*/;
  _args[2] = Row /*[VT_VARIANT:0]*/;
  _args[3] = RequestType /*[VT_I4:0]*/;
  _args[4] = OwnerData /*[VT_VARIANT:1]*/;
  return OutRetValSetterPtr(Value /*[VT_VARIANT:1]*/, _args, OleFunction(_dispid, _args));
}

template <class T> VARIANT __fastcall
IAppServer1DispT<T>::AS_RowRequest(BSTR ProviderName/*[in]*/, VARIANT Row/*[in]*/, 
                                   long RequestType/*[in]*/, VARIANT* OwnerData/*[in,out]*/)
{
  VARIANT Value;
  this->AS_RowRequest(ProviderName, Row, RequestType, OwnerData, (VARIANT*)&Value);
  return Value;
}

template <class T> HRESULT __fastcall
IAppServer1DispT<T>::AS_Execute(BSTR ProviderName/*[in]*/, BSTR CommandText/*[in]*/, 
                                VARIANT* Params/*[in,out]*/, VARIANT* OwnerData/*[in,out]*/)
{
  _TDispID _dispid(*this, OLETEXT("AS_Execute"), DISPID(20000006));
  TAutoArgs<4> _args;
  _args[1] = ProviderName /*[VT_BSTR:0]*/;
  _args[2] = CommandText /*[VT_BSTR:0]*/;
  _args[3] = Params /*[VT_VARIANT:1]*/;
  _args[4] = OwnerData /*[VT_VARIANT:1]*/;
  return OleFunction(_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  : AppServer1
// Interface: TCOMIAppServer1
// *********************************************************************//
typedef TCoClassCreatorT<TCOMIAppServer1, IAppServer1, &CLSID_AppServer1, &IID_IAppServer1> CoAppServer1;
#endif  //   __TLB_NO_INTERFACE_WRAPPERS


};     // namespace Appserver_tlb

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

#pragma option pop

#endif // AppServer_TLBH
