Registriert seit: 16. Jan 2004
Ort: Bendorf
5.219 Beiträge
Delphi 10.2 Tokyo Professional
|
AW: Funktion aus DLL einbinden
22. Aug 2016, 08:55
Alternativ zu dem was Luckie gepostet hat (dynamische Bindung) gibt es noch die etwas weniger aufwendigere statische Bindung:
Delphi-Quellcode:
function Shellexecute(hWnd: HWND; Operation, FileName, Directory: PChar; ShowCmd: Integer): HINST; stdcall; external 'shell32.dll' name 'ShellExecuteA';
procedure TForm1.Button1Click(Sender: TObject);
begin
Shellexecute(Form1.Handle, 'open', 'Notepad.exe', nil, nil, SW_NORMAL);
end;
Michael "Programmers talk about software development on weekends, vacations, and over meals not because they lack imagination,
but because their imagination reveals worlds that others cannot see."
|
|
Zitat
|