The JWSCL does only need a minor setup. You need to create a binary unit file (DCU-file) for the JEDI API Headers as described here.
You must setup JEDI API first before you can start with JWSCL! Otherwise if you set Delphi source path to include JwaWindows.pas you’ll get an error like:
Incompatible types: JwaWindows.XXX and JwaWinNT.XXX
JWSCL works with JwaWindows from the JEDI API. However this only works with some compiler directives defined in the packages in the package folder of JEDI API. Use these packages to compile and create a JwaWindows.dcu file.
ERROR: Adding the source path of JWA (folder Win32API) to your project options and then use JwaWindows and JWSCL does not work!
1. Adapt this source path to include some necessary files for JWSCL:
"path to JEDI API"\"version"\COM e.g. C:\Projects\jwapi\2.3\COM
2. Make sure that you have added the path of JwaWindows.dcu to your project or general library path. After this step you can also add the source path to the JWSCL source folder (\source) to the project or general library path so all projects can easily use JWA and JWSCL.
3. Eventually you can start using JWA and JWSCL in the simplest way: Just add the units to your uses clause.
4. Consider to update your JEDI files using Subversion (with a Subversion client like TortoiseSVN). With TortoiseSVN you can just right click on the JEDI JWSCL folder and hit “SVN Update” (not Checkout or Import!). The code is then updated.
This is a quick overview of the path settings you can use.
JEDI API Library |
Paths | Description |
| Source Paths | <path>\jwapi\<version>\Win32API |
Allows to open JwaXXXX units in Delphi-Editor with Ctrl+Enter |
| <path>\jwapi\<version>\Win32API\jwaWindows | Allows to browse Jwa identifiers in Delphi | |
| Library Paths | <path>\jwapi\<version>\Packages\<packages>\bin\release\dynamic | Tells Delphi where to find JwaWindows.dcu |
| <path>\jwapi\<version>\COM |
Tells Delphi where to find COM Type Libraries used by JEDI API&WSCL |
The JWSCL sources can be added in this way:
JWSCL |
Paths | Description |
| Source Paths | <path>\jwscl\<version>\source |
Allows to open JWSCL units in Delphi-Editor with Ctrl+Enter |
| Library Paths | <path>\jwscl\<version>\source | Tells Delphi where to find the JWSCL libraries. You don’t need to create separate DCU files because JWSCL files are compiled fast. |
These settings are also available as documentation in the Subversion Repository.
You are finished here or you can read on to get some more information:
Be aware that the order of including units may change Delphi’s behavior if an identifier with the same name is declared in several units.
Some types in these JWA units are duplicate. JwaVista recreates and extends them to add Vista support. Example:
The new _TOKEN_INFORMATION_CLASS type from JwaVista.pas has several new additions:
However, if you add JwaVista and JwaWindows in this order into your uses clause you will only use the types from JwaVista. Some functions in JwaWindows or other libraries that use JWA won’t not know these types. To get the correct type you have to explicit adress the JwaWindows type.
JWSCL does not really need an order of its units.
Newer versions of JWSCL and JWA do no more support JwaVista.
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 JWSCL folder and choose Subversion Update)
To get the latest release updates you can use this path with your Subversion client. Be aware that new versions (currently 0.9.3) 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.
| https://jedi-apilib.svn.sourceforge.net/svnroot/jedi-apilib/jwscl/branches/0.9.3 |
There is also a development branch that contains new untested features. Use it with care:
| https://jedi-apilib.svn.sourceforge.net/svnroot/jedi-apilib/jwscl/trunk |
3 Responses
How to setup the library by JEDI Windows API
07|Mar|2008 1[...] Windows Security Code Library uses the second choice (JwaWindows.pas and JwaVista.pas) only. See here how to setup [...]
TakeControl of Your Files by JEDI Windows API
10|Mar|2009 2[...] Source code is available in the example folder of our Subversion repository only. See Subversion description here. [...]
Releases for Delphi 2010 by JEDI Windows API
23|Sep|2009 3[...] How to Setup the JEDI Windows API Library (JWA). and How to Setup the JEDI Windows Security Code Library (JWSCL). [...]
Leave a reply
You must be logged in to post a comment.