动态调用DLL中的函数

  • 主题发起人 主题发起人 import
  • 开始时间 开始时间
I

import

Unregistered / Unconfirmed
GUEST, unregistred user!
typedef DWORD (WINAPI Fun) (DWORD,DWORD);
HINSTANCE hkDll=LoadLibrary("KERNEL32.DLL");
Fun*RegisterServiceProcess=(Fun*)::GetProcAddress(hkDll,"RegisterServiceProcess");
(*RegisterServiceProcess)(NULL,1);
FreeLibrary(hkDll);
===============
var
H: HWnd;
p: procedure(Handle: THandle; Path: PChar); stdcall;
begin
H := LoadLibrary(PChar('shdocvw.dll'));
if H <> 0 then
begin
p := GetProcAddress(H, PChar('DoOrganizeFavDlg'));
if Assigned(p) then p(Application.Handle, PChar(favpath));
end;
FreeLibrary(h);
end;
 

Similar threads

后退
顶部