procedure TForm1.btn1Click(Sender: TObject); type myMessagebox = function(hWnd:LongWord; lpText, lpCaption: string ; uType: LongWord): Integer; stdcall; var j_h:LongWord; j_x:Pointer; j_mb:myMessagebox; begin j_h := LoadLibrary('user32.dll'); if j_h <> 0 then begin @j_mb:=GetProcAddress(j_h, 'MessageBoxA'); j_mb(0,'动态调用','动态调用',0); FreeLibrary(j_h); end; end;