13,825
社区成员
发帖
与我相关
我的任务
分享
//---------------------------------------------------------------------------
//Form的代码
#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published: // IDE-managed Components
private: // User declarations
HINSTANCE FRcDll;
public: // User declarations
__fastcall TForm1(TComponent* Owner);
virtual __fastcall ~TForm1();
};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "TRcString.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
FRcDll = ::LoadLibrary("M:\\mts\\mtsu\\bin\\yqcln_pbchs.dll");
//TRcString rc;
}
//---------------------------------------------------------------------------
__fastcall TForm1::~TForm1()
{
::FreeLibrary(FRcDll);
}
//---------------------------------------------------------------------------
//TRcString的代码
//---------------------------------------------------------------------------
#ifndef TRcStringH
#define TRcStringH
//---------------------------------------------------------------------------
#include <windows.h>
//---------------------------------------------------------------------------
class TRcString
{
public:
TRcString();
TRcString(const char* szRcFile);
virtual ~TRcString();
private:
HINSTANCE FRcDll;
};
//---------------------------------------------------------------------------
extern TRcString* RcString;
//---------------------------------------------------------------------------
#endif//TRcStringH
//---------------------------------------------------------------------------
#include "TRcString.h"
//---------------------------------------------------------------------------
TRcString* RcString = NULL;
//---------------------------------------------------------------------------
TRcString::TRcString(const char* szRcFile)
{
FRcDll = ::LoadLibrary(szRcFile);
}
//---------------------------------------------------------------------------
TRcString::TRcString()
{
FRcDll = ::LoadLibrary("M:\\mts\\mtsu\\bin\\yqcln_pbxchs.dll");
}
//---------------------------------------------------------------------------
TRcString::~TRcString()
{
if (NULL != FRcDll)
{
::FreeLibrary(FRcDll);
FRcDll = NULL;
}
}
//---------------------------------------------------------------------------