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

📄 expmgr.cpp

📁 GExperts is a set of tools built to increase the productivity of Delphi and C++Builder programmers
💻 CPP
字号:

#include <windows.h>
#pragma hdrstop
#include <condefs.h>

USERES("ExpMgr.res");
//---------------------------------------------------------------------------
#if (__BORLANDC__ == 0x0530) // C++Builder 3.0
  #define LinkedDll "GExpert3_bcb.dll"
#elif (__BORLANDC__ == 0x0540)  // C++Builder 4.0
  #define LinkedDll "GExpert4_bcb.dll"
#elif (__BORLANDC__ == 0x0550 || __BORLANDC__ == 0x0551)  // C++Builder 5.0
  #define LinkedDll "GExpert5_bcb.dll"
#elif (__BORLANDC__ >= 0x0560 && __BORLANDC__ <= 0x0564)  // C++Builder 6.0
  #define LinkedDll "GExpert6_bcb.dll"
#else
  #error Unknown version of C++Builder
#endif

void Error(const char * const ErrorMessage)
{
  MessageBox(0, ErrorMessage, "Error", MB_ICONERROR | MB_OK);
  throw(ErrorMessage);
}

//---------------------------------------------------------------------------
#pragma argsused
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
  typedef  void __stdcall (*PlainProcedure)(void);

  HANDLE GExpertsDllHandle;

  GExpertsDllHandle = LoadLibrary(LinkedDll);
  if (GExpertsDllHandle == 0)
  {
    Error( "Could not find required GExperts DLL: " \
           LinkedDll);
  }

  try
  {
    PlainProcedure ShowExpertManager;

    // Get entry point for ShowExpertManager
    ShowExpertManager = (PlainProcedure)GetProcAddress(GExpertsDllHandle, "ShowExpertManager");
    if (ShowExpertManager == NULL)
    {
      Error( "Could not find >ShowExpertManager< DLL export in " \
             LinkedDll);
    }

    try
    {
      ShowExpertManager();
    }
    __finally
    {
    }
  }
  __finally
  {
    FreeLibrary(GExpertsDllHandle);
  }

  return 0;
}

⌨️ 快捷键说明

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