Thema: Power++

Einzelnen Beitrag anzeigen

Benutzerbild von toms
toms
(CodeLib-Manager)

Registriert seit: 10. Jun 2002
4.648 Beiträge
 
Delphi XE Professional
 
#24

AW: Delphi++

  Alt 1. Aug 2010, 07:32
is it possible to use extenal dlls and how to import functions like messagebox or what ever?

Delphi-Quellcode:
const
  MB_OK = $00000000;
var
  mH, pH: THandle;
begin
  mH := Windows.LoadLibrary('user32.dll');
  if mH <> 0 then
  begin
    pH := Windows.GetProcAddress(mH, 'MessageBoxA');
    if pH <> 0 then
    Windows.iCall(pH, [Sender.Form.Handle, 'text', 'title', MB_OK]);
  end;
end;
Thomas