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

📄 myappservimpl.h

📁 C++Builder高级应用开发指南随书源码
💻 H
字号:
// MYAPPSERVIMPL.H : Declaration of the MyAppServ

#ifndef MyAppServImplH
#define MyAppServImplH

#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>

#include "Project1_TLB.H"
#include <Db.hpp>
#include <DBTables.hpp>
#include <Provider.hpp>
#include <atl/atlvcl.h>



// Forward ref. of IAppServer implementor


/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
class TMyAppServ : public TCRemoteDataModule
{
__published:  // IDE-managed Components
    TTable *tbAnimal;
    TDataSetProvider *DataSetProvider1;
    TDataSetProvider *DataSetProvider2;
    TQuery *qrCustomer;
    TTable *tbItems;
    TTable *tbOrders;
    TDataSource *dsOrder;
    TDataSetProvider *DataSetProvider3;
    void __fastcall CRemoteDataModuleCreate(TObject *Sender);
    void __fastcall CRemoteDataModuleDestroy(TObject *Sender);
    void __fastcall tbAnimalBeforeOpen(TDataSet *DataSet);
    OleVariant __fastcall DataSetProvider1DataRequest(TObject *Sender,
          OleVariant &Input);
private:      // User declarations
public:       // User declarations
  __fastcall TMyAppServ(TComponent* Owner);

__published:
};


/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
extern PACKAGE TMyAppServ *MyAppServ;


/////////////////////////////////////////////////////////////////////////////
// TMyAppServImpl     Implements IMyAppServ, default interface of MyAppServ
//                  and IMyAppServEvents, the default source interface
// ThreadingModel : Apartment
// Dual Interface : TRUE
// Event Support  : TRUE
// Default ProgID : Project1.MyAppServ
// Description    : 
/////////////////////////////////////////////////////////////////////////////
class ATL_NO_VTABLE TMyAppServImpl: REMOTEDATAMODULE_IMPL(TMyAppServImpl, MyAppServ, TMyAppServ, IMyAppServ)
                                 ,public IConnectionPointContainerImpl<TMyAppServImpl>,
                                  public TEvents_MyAppServ<TMyAppServImpl>
{
public:

BEGIN_COM_MAP(TMyAppServImpl)
  RDMOBJECT_COM_INTERFACE_ENTRIES(IMyAppServ)
  COM_INTERFACE_ENTRY_IMPL(IConnectionPointContainer)
END_COM_MAP()

BEGIN_CONNECTION_POINT_MAP(TMyAppServImpl)
  CONNECTION_POINT_ENTRY(DIID_IMyAppServEvents)
END_CONNECTION_POINT_MAP()

  // Data used when registering Object 
  //
  DECLARE_THREADING_MODEL(otApartment);
  DECLARE_PROGID("Project1.MyAppServ");
  DECLARE_DESCRIPTION("");

  // Function invoked to (un)register object
  //
  static HRESULT WINAPI UpdateRegistry(BOOL bRegister)
  {
    TRemoteDataModuleRegistrar regObj(GetObjectCLSID(), GetProgID(), GetDescription());
    // Disable these flags in order to disable use by socket or web connections.
    // Also set other flags to configure the behavior of your application server.
    // For more information, see atlmod.h and atlvcl.cpp.
    regObj.Singleton = false;
    regObj.EnableWeb = true;
    regObj.EnableSocket = true;
    return regObj.UpdateRegistry(bRegister);
  }


// IMyAppServ
protected:
};

#endif  // MyAppServImplH

⌨️ 快捷键说明

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