Look at the TlHelp32 unit that comes with Delphi.
--
Rob
uses Windows;
type
TMessageBoxAFunc = function (hWnd: HWND; lpText, lpCaption:
PAnsiChar; uType: UINT): Integer; stdcall;
procedure TMainForm.TestBtnClick(Sender: TObject);
var
Handle: THandle;
Func: TMessageBoxAFunc;
begin
Handle := LoadLibrary('user32.dll');
try
Func := GetProcAddress(Handle, 'MessageBoxA');
Func(0, 'test', 'test', MB_OK);
finally
FreeLibrary(Handle);
end;
end;