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

📄 project1_tlb.h

📁 bcb应用开发技术解析 包括多线程
💻 H
📖 第 1 页 / 共 3 页
字号:
// SmartIntf: TCOMIMyAppServer_MultiModule_Child
// Interface: IMyAppServer_MultiModule_Child
// *********************************************************************//
template <class T /* IMyAppServer_MultiModule_Child */ >
class TCOMIMyAppServer_MultiModule_ChildT : public TComInterface<IMyAppServer_MultiModule_Child>, public TComInterfaceBase<IUnknown>
{
public:
  TCOMIMyAppServer_MultiModule_ChildT() {}
  TCOMIMyAppServer_MultiModule_ChildT(IMyAppServer_MultiModule_Child *intf, bool addRef = false) : TComInterface<IMyAppServer_MultiModule_Child>(intf, addRef) {}
  TCOMIMyAppServer_MultiModule_ChildT(const TCOMIMyAppServer_MultiModule_ChildT& src) : TComInterface<IMyAppServer_MultiModule_Child>(src) {}
  TCOMIMyAppServer_MultiModule_ChildT& operator=(const TCOMIMyAppServer_MultiModule_ChildT& src) { Bind(src, true); return *this;}


};
typedef TCOMIMyAppServer_MultiModule_ChildT<IMyAppServer_MultiModule_Child> TCOMIMyAppServer_MultiModule_Child;

// *********************************************************************//
// DispIntf:  IMyAppServer_MultiModule_Child
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {B8607004-111A-4ABF-B5E6-49CACF5019B7}
// *********************************************************************//
template<class T>
class IMyAppServer_MultiModule_ChildDispT : public TAutoDriver<IMyAppServer_MultiModule_Child>
{
public:
  IMyAppServer_MultiModule_ChildDispT(){}

  IMyAppServer_MultiModule_ChildDispT(IMyAppServer_MultiModule_Child *pintf)
  {
    TAutoDriver<IMyAppServer_MultiModule_Child>::Bind(pintf, false);
  }

  IMyAppServer_MultiModule_ChildDispT(IMyAppServer_MultiModule_ChildPtr pintf)
  {
    TAutoDriver<IMyAppServer_MultiModule_Child>::Bind(pintf, true);
  }

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

  IMyAppServer_MultiModule_ChildDispT& operator=(IMyAppServer_MultiModule_ChildPtr pintf)
  {
    TAutoDriver<IMyAppServer_MultiModule_Child>::Bind(pintf, true);
    return *this;
  }

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

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

  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 IMyAppServer_MultiModule_ChildDispT<IMyAppServer_MultiModule_Child> IMyAppServer_MultiModule_ChildDisp;

// *********************************************************************//
// SmartIntf: TCOMIMyAppServer_MultiModule_Main
// Interface: IMyAppServer_MultiModule_Main
// *********************************************************************//
template <class T> HRESULT __fastcall
TCOMIMyAppServer_MultiModule_MainT<T>::get_ChildRDM(Project1_tlb::IMyAppServer_MultiModule_Child** Value/*[out,retval]*/)
{
  return (*this)->get_ChildRDM(Value);
}

template <class T> HRESULT __fastcall
TCOMIMyAppServer_MultiModule_MainT<T>::get_ChildRDM(Project1_tlb::IMyAppServer_MultiModule_ChildPtr* Value/*[out,retval]*/)
{
  return (*this)->get_ChildRDM(IMyAppServer_MultiModule_Child**)Value);
}

template <class T> Project1_tlb::IMyAppServer_MultiModule_ChildPtr __fastcall
TCOMIMyAppServer_MultiModule_MainT<T>::get_ChildRDM(void)
{
  Project1_tlb::IMyAppServer_MultiModule_Child* Value;
  OLECHECK(this->get_ChildRDM((Project1_tlb::IMyAppServer_MultiModule_Child**)&Value));
  return (Project1_tlb::IMyAppServer_MultiModule_ChildPtr)Value;
}

// *********************************************************************//
// DispIntf:  IMyAppServer_MultiModule_Main
// Flags:     (4416) Dual OleAutomation Dispatchable
// GUID:      {58A8FD5A-7916-4D76-B241-F20DB9CA7AE8}
// *********************************************************************//
template <class T> HRESULT __fastcall
IMyAppServer_MultiModule_MainDispT<T>::get_ChildRDM(Project1_tlb::IMyAppServer_MultiModule_Child** Value/*[out,retval]*/)
{
  _TDispID _dispid(*this, OLETEXT("ChildRDM"), DISPID(1));
  TAutoArgs<0> _args;
  return OutRetValSetterPtr((LPDISPATCH*)(Project1_tlb::IMyAppServer_MultiModule_Child**)Value /*[VT_USERDEFINED:2]*/, _args, OlePropertyGet(_dispid, _args));
}

template <class T> Project1_tlb::IMyAppServer_MultiModule_Child* __fastcall
IMyAppServer_MultiModule_MainDispT<T>::get_ChildRDM(void)
{
  Project1_tlb::IMyAppServer_MultiModule_Child* Value;
  this->get_ChildRDM((Project1_tlb::IMyAppServer_MultiModule_Child**)&Value);
  return Value;
}

template <class T> HRESULT __fastcall
IMyAppServer_MultiModule_MainDispT<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
IMyAppServer_MultiModule_MainDispT<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
IMyAppServer_MultiModule_MainDispT<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
IMyAppServer_MultiModule_MainDispT<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
IMyAppServer_MultiModule_MainDispT<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
IMyAppServer_MultiModule_MainDispT<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
IMyAppServer_MultiModule_MainDispT<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
IMyAppServer_MultiModule_MainDispT<T>::AS_GetProviderNames(void)
{
  VARIANT Value;
  this->AS_GetProviderNames((VARIANT*)&Value);
  return Value;
}

template <class T> HRESULT __fastcall
IMyAppServer_MultiModule_MainDispT<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
IMyAppServer_MultiModule_MainDispT<T>::AS_GetParams(BSTR ProviderName/*[in]*/, 

⌨️ 快捷键说明

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