Posted by: Christian Wimmer in: JEDI Windows API Headers
The JEDI API library provides you two ways of using it. Either you can use all the single units like JwaWinUser.pas and JwaWinTypes.pas or you can use just one unit that includes all these single units. It is called JwaWindows.pas. The
1. Single units use:
Single units are included into your project by adding the JEDI API source folder to your Delphi search path. Then you can use the units like
Be aware that some JEDI API examples use the single units approach. So if you want to compile them you have to add the folders to Delphi source path.
However, it is possible to use it in combination with the JwaWindows.dcu approach.
Add these folders to your Delphi source path (located in the JWA folder)
We suggest to add these paths to your global source path of Delphi. To do so open the options dialog of Delphi (menu Tools -> Options) and navigate to the tab Library or Library Win32 (in newer Delphi).
There you add the three folders to the library path edit. Of course, you need to add absolute paths here like shown in example.
So you saved the download “JEDI API 2.3 and JEDI WSCL 0.9.3.zip“ in this location
The zip file contains two projects located in folder jwa and jwscl. So you need to find the folders above by following the directory structure to :
In this folder you’ll find the folders Common, Win32API and COM that you need to add to your Delphi source path.
(You must not add qotation marks (“) since the space in Program Files is not a separator.)
2. JwaWindows.pas (also for the use with JWSCL)
There is also the possibility to use only one file that includes all other Jedi API headers. It is called JwaWindows.pas.
Do not mix up the Jwa units like this:
It is possible to do so but in this way you will create duplicate and incompatible identifiers which will also collide with JWSCL.
We also suggest that you compile the file at first and then use the binary dcu file instead of the source directly. So you should add the location of JwaWindows.dcu to your Delphi source path to avoid rebuilding the file everytime you rebuild your project.
There are packages in the jwapi\Packages folder for the different Delphi versions. If not just use an older package version. That should suffice.
You can load the project group for your Delphi version and compile the different package types :
The project group contains all four package types and are predefined to save the output in different folders.
After a successful compilation, copy the folder or point the compiler path to the directory of your choice e.g. \jwapi\trunk\Packages\d7\bin\debug\dynamic . Now your Delphi will use the dcu files instead of the source files.
The packages contains JwaWindows AND jwaVista. Both units must be included in a uses clause. JwaWindows does not contain jwaVista!
The JEDI Windows Security Code Library uses the second choice (JwaWindows.pas and JwaVista.pas (JwaVista is deprecated in future versions)) only. See here how to setup JWSCL. Furthermore it is recommended to use any of the dynamic linking packages for JWSCL.
This is a quick overview of the path settings you can use.
JEDI API Library
Allows to open JwaXXXX units in Delphi-Editor with Ctrl+Enter
Allows to browse Jwa identifiers in Delphi.
|Library Paths||<path>\jwapi\<version>\Win32API||1st choice:
Tells Delphi where to find JwaXXXX.pas
Tells Delphi where to find JwaWindows.dcu
Tells Delphi where to find COM Type Libraries used by JEDI API&WSCL
These settings are also available as documentation in the Subversion Repository.
Sourceforge gives a short introduction how you can access the Subversion repository of the JEDI project.
The download packages (from Sourceforge) contain Subversion information so you can use your subversion tool to just update them. (Tortoisesvn: Right click the JWA folder and choose Subversion Update)
To get the latest release updates directly you can use this path with your Subversion client. Be aware that new versions (currently 2.2a) can make this path obsolete (but still valid). The downloadable release packages are already provided with Subversion information so you can just update them to get the newest updates.
Click on the turtle to checkout the repository with TortoiseSVN.
There is also a development branch that contains new untested features. Use it with care: