Delphi windows api unit
Some noteworthy additions to Windows unit include APIs that have been around for some time, but were not previously available in the core Delphi interface unit for the Windows API:. Two interesting new functions part of the SDK since a service pack of Windows XP are SetDllDi rectory and GetDllDi rectory, which you can use to determine and change the folder from which an application will load its dynamic libraries and Delphi run-time packages.
There are about new 10 "timer queue" support functions, starting with: function CreateTimerQueue: THandle; stdcall;. There are also various touch input support functions and data structures, gesture support, devices integration, physical points support and the like. The DwmApi unit has been largely extended and rewritten using delayed loading rather than custom dynamic loading. ShellExecute in Delphi — Launch external applications.
The function returns an integer that corresponds to an error code which is very useful when we need to show some status if the function worked or not. By using ShellExecute we can also do following operations Syntax of Windows API function. A handle to the parent window used for displaying a UI or error messages. Ex - handle.
FileName, link URL to open and modify. EX - PChar filename. The active window remains active. If the window is minimized or maximized, Windows restores it to its original size and position. If the return value of ShellExecute is greater than 32, the application was executed successfully.
EXE file is invalid non-Win EXE or error in. Message, mtError, [mbOK], 0 ; end; end;. In order to use the function, you first need to add the ShellApi to your uses clause, like :. Unknown November 1, at PM. Note: this article probably will need to be updated to reflect the current FPC 2.
BigChimp, October This article will try to sketch an overview of what is available in FPC. Lazarus of course also supports Windows APIs e. In general this page will describe the status as of FPC 2. In older versions more windows units were present in the RTL directory.
0コメント