static HINSTANCE hMyMyNtQuerySystemInformation;
            int (_cdecl *pfnHook)(DWORD); hMyMyNtQuerySystemInformation= LoadLibrary(("QSI.dll"));
if(hMyMyNtQuerySystemInformation)
{
pfnHook = (int(*)(DWORD))GetProcAddress(hMyMyNtQuerySystemInformation,"Hook");
pfnHook(GetCurrentProcessId());
}
else
{
MessageBox(NULL,("Failed to load HookNTQSI.dll "),NULL,MB_OK | MB_APPLMODAL | MB_ICONWARNING);
}procedure TForm1.Button1Click(Sender: TObject);
var
   pfnHook: function(dwProcessID: DWord): integer; CDecl;
   DllName:string;
   Buffer:array [0..127] of char;
   hLib: Cardinal;
begin
    DllName:='QSI.dll';
    strPcopy(buffer,Dllname);
    hLib := LoadLibrary(buffer);
    if hLib <> 0 then begin
        try
          @pfnHook := GetProcAddress(hLib, 'Hook');
          if pfnHook(GetCurrentProcessId)>0 then
             MessageDlg('调用函数成功!',mtInformation,[mbOk],0)
          else
             MessageDlg('调用函数失败!',mtError,[mbOk],0);
        finally
          FreeLibrary(hLib);
        end;
    end else begin
        MessageDlg('载入库失败!',mtError,[mbOk],0);
    end;
end;