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

📄 ztvloadlib.pas

📁 ziptv为delphi控件
💻 PAS
字号:
Unit ztvLoadLib;

(*--------------------------------------------------------------------------*)
(*                                                                          *)
(*       Unit   : MyLibLod                                                  *)
(*                                                                          *)
(*       Purpose: Loads library dynamically and suppresses error box.       *)
(*                                                                          *)
(*       Author : Philip R. "Pib" Burns.  98/08/10.                         *)
(*                                                                          *)
(*--------------------------------------------------------------------------*)

Interface

Uses
   Messages,
   Windows;

{$I ZipTV.inc}                          //Declare the compiler defines

(* EXPORTS *)
Function MyLoadLibrary(LibName: String): THandle;

(*--------------------------------------------------------------------------*)

Implementation

(*--------------------------------------------------------------------------*)
(*     MyLoadLibrary --- Loads library while suppressing error box.         *)
(*--------------------------------------------------------------------------*)

Function MyLoadLibrary(LibName: String): THandle;

Var
   PrevError: longint;

Begin                                   (* MyLoadLibrary *)
   (* Don't display an error box if the *)
   (* library can't be loaded.          *)

   PrevError := SetErrorMode(SEM_NOOPENFILEERRORBOX);

   (* Try loading the library. *)

   Result := LoadLibrary(PChar(LibName));

   (* Restore previous error box display *)
   (* state.                             *)
   SetErrorMode(PrevError);

End (* MyLoadLibrary *);

(*--------------------------------------------------------------------------*)

End.

⌨️ 快捷键说明

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