server.cpp

来自「Direct Oracle Access 非常好的Oracle数据库直接访问组」· C++ 代码 · 共 42 行

CPP
42
字号
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop
#include <atl\atlmod.h>
#include "ServerCPPDM.h"
USERES("Server.res");
USEFORM("ServerUnit.cpp", MainForm);
USETLB("Server.tlb");
USEUNIT("Server_TLB.cpp");
USEFORM("ServerCPPDM.cpp", RemoteCPPDM); /* TCRemoteDataModule: File Type */ /* ServerCPPDM: CoClass */
USEUNIT("Server_ATL.cpp");
//---------------------------------------------------------------------------
TComModule _ProjectModule(0 /*InitATLServer*/);
TComModule &_Module = _ProjectModule;

// The ATL Object map holds an array of _ATL_OBJMAP_ENTRY structures that
// described the objects of your OLE server. The MAP is handed to your
// project's CComModule-derived _Module object via the Init method.
//
BEGIN_OBJECT_MAP(ObjectMap)
  OBJECT_ENTRY(CLSID_ServerCPPDM, TServerCPPDMImpl)
END_OBJECT_MAP()
//---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
        try
        {
                 Application->Initialize();
                 // Prevent the MainForm from showing
                 Application->ShowMainForm = false;
                 Application->CreateForm(__classid(TMainForm), &MainForm);
                 Application->Run();
        }
        catch (Exception &exception)
        {
                 Application->ShowException(&exception);
        }
        return 0;
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

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