int (__stdcall *InitRmOSD)()= NULL;
int (__stdcall *FreeRmOSD)()= NULL;
int (__stdcall *SetParamRmOSD)(int X,int Y, int W, int H)= NULL;
int (__stdcall *ShowRmOSD)(int SwMode)= NULL;
int (__stdcall *SetImageRmOSD)(LPCTSTR FileName,bool isStretch,int Posx,int Posy)= NULL;
int (__stdcall *SetTextRmOSD)(LPCTSTR Text,int X, int Y, int ScrollMode,LPCSTR FontName,
int FontSize, int FontColor)= NULL;
int (__stdcall *SetRegSn)(LPCTSTR RegStr)= NULL;
HINSTANCE hInst;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
//调用时如下:
hInst = LoadLibrary("OSD.DLL");
if (hInst)
{
(FARPROC)InitRmOSD=GetProcAddress(hInst,"InitRmOSD");
if (InitRmOSD)
{
if (InitRmOSD<0)
MessageBox(Handle,"初试化OSD接口失败!!!",Caption.c_str(),MB_ICONEXCLAMATION );
}
else
{
MessageBox(Handle,"引用链接库中的函数InitRmOSD失败!",Caption.c_str(),MB_ICONEXCLAMATION );
}
}}
//---------------------------------------------------------------------------