<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>JEDI Windows API &#187; JWSCL Downloads</title>
	<atom:link href="http://blog.delphi-jedi.net/category/downloads/jwscl-downloads/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.delphi-jedi.net</link>
	<description>Joint Endeavor of Delphi Innovators of Windows Programming</description>
	<lastBuildDate>Sat, 21 Aug 2010 05:44:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>JWSCL Features Overview</title>
		<link>http://blog.delphi-jedi.net/2010/02/22/jwscl-features-overview/</link>
		<comments>http://blog.delphi-jedi.net/2010/02/22/jwscl-features-overview/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 12:43:46 +0000</pubDate>
		<dc:creator>Christian Wimmer</dc:creator>
				<category><![CDATA[JWSCL Downloads]]></category>

		<guid isPermaLink="false">http://blog.delphi-jedi.net/?p=652</guid>
		<description><![CDATA[I had some free time that I used to put together all the features JWSCL provides currently. There are some more features that are implemented by other tool classes or functions that I left out in favor of a good overview. A complete overview of all classes, methods and more gives you the documentation at [...]]]></description>
			<content:encoded><![CDATA[<p>I had some free time that I used to put together all the features JWSCL provides currently. There are some more features that are implemented by other tool classes or functions that I left out in favor of a good overview. A complete overview of all classes, methods and more gives you the documentation at <a href="http://jwscldoc.delphi-jedi.net." target="_blank">http://jwscldoc.delphi-jedi.net</a>.</p>
<p>So here are the feautures (You can look up the class names on the documentation page):</p>
<p><span id="more-652"></span></p>
<ul>
<li> Windows Token management (TJwSecurityToken)
<ul>
<li>Impersonation</li>
<li>Supports LogonUser, LsaLogonUser </li>
<li>Lots more</li>
</ul>
</li>
<li>Full support of Security ID (SID) (TJwSecurityID, TJwSecurityIDList)
<ul>
<li>Also well known security IDs like Everyone (JwsclKnownSid.pas) are stored as simple to use variables.</li>
</ul>
</li>
<li>Full support of Access Control Lists (also CALLBACK_ACE and OBJECT_ACE)
<ul>
<li>DACL, SACL</li>
</ul>
</li>
<li>Full support of Security Descriptor (SECURITY_DESCRIPTOR) (TJwSecurityDescriptor)
<ul>
<li>DACL, SACL, Owner, Group</li>
<li>Implements a simple to use Security Descriptor (TJwSimpleDescriptor)</li>
</ul>
</li>
<li>Security Rights Mapping; Maps Generic Rights to specific ones (JwsclMapping.pas)
<ul>
<li>Conversion of Security Rights (DWORD) to Human Readable names (JwFormatAccessRights)</li>
</ul>
</li>
<li>Privileges (TJwPrivilege, TJwPrivilegeSet, JwsclPrivileges.pas)</li>
<li>Windowstation and Desktops (TJwSecurityWindowStation, TJwSecurityDesktop)</li>
<li>Local Security Authority Logon Sessions (TJwLsaLogonSession)</li>
<li>Security of Windows objects; files, registry, handles (TJwSecureFileObject, TJwSecureFileObject, TJwSecureGeneralObject)
<ul>
<li>Support of Access Checking (AccessCheck)</li>
<li>Supports Inheritance (by default only files and registry)</li>
</ul>
</li>
<li>Support of MS AuthZ API; Client Side Access Checks for custom Resources (JwsclAuthCtx.pas) </li>
<li>Credentials GUI API (TJwCredentialsPrompt)</li>
<li>MS Encryption and Protection API (TJwEncryptionApi,  TJwEncryptMemory, TJwRandomDataGenerator)</li>
<li>Windows Version Detection on remote or local client (TJwFileVersion, TJwServerInfo, TJwWindowsVersion) </li>
<li>Security Descriptor GUI (TJwSecurityDescriptorDialog)</li>
<li>Terminal Sessions (TJwTerminalServer)
<ul>
<li>Server Management</li>
<li>Sessions Management</li>
<li>Processes Management</li>
</ul>
</li>
<li>Vista Elevation (JwShellExecute, JwElevateProcess, JwsclElevation.pas)
<ul>
<li>Supports <a title="German page only" href="http://kay-bruns.de/wp/software/surun/" target="_blank">SuRun</a> (<a title="Auto Translation" href="http://translate.google.com/translate?u=http%3A%2F%2Fkay-bruns.de%2Fwp%2Fsoftware%2Fsurun%2F&amp;langpair=de%7Cen&amp;hl=de&amp;safe=active&amp;ie=UTF-8&amp;oe=UTF-8&amp;prev=%2Flanguage_tools" target="_blank">English version</a>) (JwElevateProcess, JwCheckSuRunStatus)</li>
</ul>
</li>
<li>Vista Integrity Level (Built in)</li>
<li>Firewall Administration (TJwsclFirewall)</li>
<li>Builtin basic Sma rtpointer Support (TJwAutoLock)</li>
<li>Job Object support (TJwJobObject) even with several sessions (TJwJobObjectSessionList)</li>
<li>Process Handling that encapsulates support for different Windows Versions and bugs in API (functions JwCreateProcessAsAdminUser, JwCreateProcessInSession, JwGetProcessSessionID, JwGetTokenFromProcess, JwProcessIdToSessionId) </li>
<li>Support Memory Mapped Objects (TJwFileStreamEx, TJwIPCStream, TJwVirtualStream)</li>
<li>Extended Thread Support lile naming threads and WaitWithTimeOut (TJwThread)</li>
<li>Hashing Support (TJwHash) 
<ul>
<li>For JWSCL classes (JwObjectHash)</li>
<li>For files (JwCreateFileHash, JwCompareFileHash, JwDataHash, JwIntegerHash) in combination with fast Memory Mapping.</li>
</ul>
</li>
<li>DCOM support for Client and Server (currently only developer branch); CoInitializeSecurity (TJwComProcessSecurity), Authentication, Impersonation, Proxy Security Blanket (TJwComClientSecurity, TJwComServerSecurity), Access Control (TJwServerAccessControl), DCOM Configuration (TJwComRegistrySecurity) of Global Configs and Class Security.</li>
<li>Easy to use WinAPI (Msg)WaitForMultipleObjects functions (JwMsgWaitForMultipleObjects, JwMsgWaitForMultipleObjects)</li>
<li>Multi Language Support of Resource Files (LoadLocalizedString)</li>
<li>Ansi- &amp; Unicode due to own Delphi compatible String type TJwString (JwsclAnsiUniCode.pas)</li>
<li>Mapping of Windows Constants to Delphi enumeration (TJwEnumMap)</li>
<li>All errors are reported by exceptions using a derived class from EJwsclSecurityException. (JwsclExceptions.pas)</li>
<li> Supports Bugreports with Eurekalog (JwsclEurekaLogUtils.pas)</li>
<li>JWSCL is based on OOP </li>
</ul>
<p>To come</p>
<ul>
<li> Active Directory Support</li>
<li>User Account Management</li>
</ul>
<p>Current version is <a href="http://blog.delphi-jedi.net/2009/09/23/releases-for-delphi-2010/">0.9.3 Download.</a></p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.delphi-jedi.net/2010/02/22/jwscl-features-overview/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Releases for Delphi 2010</title>
		<link>http://blog.delphi-jedi.net/2009/09/23/releases-for-delphi-2010/</link>
		<comments>http://blog.delphi-jedi.net/2009/09/23/releases-for-delphi-2010/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 22:07:07 +0000</pubDate>
		<dc:creator>Christian Wimmer</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[JWA Downloads]]></category>
		<category><![CDATA[JWSCL Downloads]]></category>

		<guid isPermaLink="false">http://blog.delphi-jedi.net/?p=450</guid>
		<description><![CDATA[JEDI Windows API (JWAL) and JEDI Windows Security Library (JWSCL) are now available in version 2.3 and 0.9.3. They support Delphi 2010. You can download them or use the new Subversion branches. If you find bugs, have questions, hints or want to participate: just mail us. Downloads Download from one of the Sourceforge mirrors at: [...]]]></description>
			<content:encoded><![CDATA[<p>JEDI Windows API (JWAL) and JEDI Windows Security Library (JWSCL) are now available in version 2.3 and 0.9.3. They support Delphi 2010.<br />
 You can download them or use the new Subversion branches.</p>
<p><span id="more-450"></span></p>
<p>If you find bugs, have questions, hints or want to participate: just <a href="http://mailhide.recaptcha.net/d?k=01MeKrDPlF4UMY4OOGe4JcPA==&amp;c=qu6RnFAF5jjxh0bbfE7ymCJCa5TFUIfZS6RdKFzWmME=">mail</a> us.</p>
<h2>Downloads</h2>
<p>Download from one of the Sourceforge mirrors at:</p>
<p><a href="https://sourceforge.net/projects/jedi-apilib/files">https://sourceforge.net/projects/jedi-apilib/files</a></p>
<p>(The download has Subversion folders <em>.SVN</em> which you can use to get updates through a Subversion Client. See below.)</p>
<h3>AND do <span style="text-decoration: underline;">not</span> forget to read:</h3>
<p><a href="http://blog.delphi-jedi.net/2007/12/27/how-to-setup-the-library/">How to Setup the JEDI Windows API Library (JWA).</a><br />
 and<br />
 <a href="http://blog.delphi-jedi.net/2008/03/03/how-to-setup-jwscl/">How to Setup the JEDI Windows Security Code Library (JWSCL).</a></p>
<h2>Subversion Access</h2>
<p>You can use a Subversion client, like <a href="http://tortoisesvn.tigris.org/" target="_blank">TortoiseSVN</a>, to download the sources directly.<br />
 <span style="text-decoration: underline;">Advantage</span>: You can easily get updated sources.</p>
<h3>JWA</h3>
<table style="width: 477px; height: 58px;" border="1">
<tbody>
<tr>
<td><a href="tsvn:https://jedi-apilib.svn.sourceforge.net/svnroot/jedi-apilib/jwapi/branches/2.3"><img title="tortoisecheckout" src="http://blog.delphi-jedi.net/wp-content/uploads/2007/12/tortoisecheckout.png" alt="Checkout with TortoiseSVN" width="48" height="48" /></a></td>
<td>https://jedi-apilib.svn.sourceforge.net/svnroot/jedi-apilib/jwapi/branches/2.3</td>
</tr>
</tbody>
</table>
<h3>JWSCL</h3>
<table style="width: 485px; height: 58px;" border="1">
<tbody>
<tr>
<td><a href="tsvn:https://jedi-apilib.svn.sourceforge.net/svnroot/jedi-apilib/jwscl/branches/0.9.3"><img title="tortoisecheckout" src="http://blog.delphi-jedi.net/wp-content/uploads/2007/12/tortoisecheckout.png" alt="Checkout with TortoiseSVN" width="48" height="48" /></a></td>
<td>https://jedi-apilib.svn.sourceforge.net/svnroot/jedi-apilib/jwscl/branches/0.9.3</td>
</tr>
</tbody>
</table>
<p><em>Click on the turtle to get the source if you have installed TortoiseSVN.</em></p>
<h2>Remaining Issues</h2>
<p>22. August 2009</p>
<p>There is an issue left with D2010: <br />
 The interface <em>IXMLElement</em> is no more available in file msxml.pas (MS XML Version 1). So the file <em>JwaUrlMon.pas</em> has been changed to use a <em>Pointer </em>instead of the <em>IXMLElement </em>interface. Unfortunately, the new IXmlDOMElement (MS XML Version 2) is not compatible with the old interface. <br />
 If you have an idea how to fix that, please <a href="http://mailhide.recaptcha.net/d?k=01MeKrDPlF4UMY4OOGe4JcPA==&amp;c=qu6RnFAF5jjxh0bbfE7ymCJCa5TFUIfZS6RdKFzWmME=">mail</a> to us.</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.delphi-jedi.net/2009/09/23/releases-for-delphi-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TakeControl of Your Files</title>
		<link>http://blog.delphi-jedi.net/2009/03/10/takecontrol-of-your-files/</link>
		<comments>http://blog.delphi-jedi.net/2009/03/10/takecontrol-of-your-files/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 18:15:50 +0000</pubDate>
		<dc:creator>Christian Wimmer</dc:creator>
				<category><![CDATA[JEDI Windows Security Code Lib]]></category>
		<category><![CDATA[JWSCL Downloads]]></category>

		<guid isPermaLink="false">http://blog.delphi-jedi.net/?p=296</guid>
		<description><![CDATA[Recently my Windows Vista partition ran out of disk space. Well, the partition has 30GiB but that is not enough even if you choose to install 3rd party software on a separate disk. The main reason why Windows Vista needs so much space is the WinSxS folder which contains a lot of DLL files and [...]]]></description>
			<content:encoded><![CDATA[<p>Recently my Windows Vista partition ran out of disk space. Well, the partition has 30GiB but that is not enough even if you choose to install 3rd party software on a separate disk. The main reason why Windows Vista needs so much space is the <a href="http://blog.delphi-jedi.net/2008/09/30/why-windows-vista-eats-up-your-harddisk-space/">WinSxS</a> folder which contains a lot of DLL files and more (at least for me). I don&#8217;t want to go into detail here but this folder holds (nearly) duplicate files for compability and language reasons.</p>
<h3><span id="more-296"></span>Astonishment</h3>
<p>However, I was (a little) astounded when I found out that in this folder also Windows Media (.WMV) files reside which took about 600MiB alone on my PC (depends on your situation and software). I watched them and can tell you that I&#8217;ve never seen them before and I won&#8217;t watch them in future. These files usually can be found in C\Windows\Help\Windows\&lt;languageID&gt;.  I have them in two language versions because it happens that I have installed a German and English language Windows pack.  Windows fools you by linking these files to any of the WinSxS file &#8220;duplicates&#8221;. Depending on your language  you always watch them in your language.</p>
<h3>Command and Conquer your System</h3>
<p>Removing these files is very trick. The reason is that the WinSxS folder is heavily secured against messing around. Only the user &#8220;Trusted Installer&#8221; () can get full control and it is also the owner. Well, that is nice for beginners. But experts &#8211; like me &#8211; <strong>want full control</strong> of their files. So the easiest way to get full access is to become the owner of each folder we want to remove. Then we can give us full control by adding our user to the access control list (ACL). However in this way we need a lot of time to change all these folders. We could also change the top folder and let the security changes iterate through the childs (folders and files). But this approach takes a long time and is also a security risk because all folders and files are changed without exceptions. You could also write a batch or any other script file to do the job, but I am not experienced enough for this.<br />
Another problem is that we maybe want to keep a backup that can be restored in the case of an emergency (&#8220;I want to see these movies!&#8221;).</p>
<p>So which language could we use to become owner of a file, change file security, copy a file and more? Well, if you don&#8217;t  think Delphi you can stop reading now  <img src='http://blog.delphi-jedi.net/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<h3>TakeControl</h3>
<p>I have created this application which I call &#8220;TakeControl&#8221;. It is a simple application that helps you to find files and let you access them with full control.<br />
Its main task is to move files which you think aren&#8217;t necessary to have on the partiton.  In my case there were a lot of media files which I didn&#8217;t want to have (also in Windows folder).</p>
<p>The application dialog looks like this</p>
<p><a href="http://blog.delphi-jedi.net/wp-content/uploads/2009/03/takecontrol.jpg" rel="lightbox[296]" title="takecontrol"><img class="alignnone size-full wp-image-302" title="takecontrol" src="http://blog.delphi-jedi.net/wp-content/uploads/2009/03/takecontrol.jpg" alt="takecontrol" width="295" height="296" /></a></p>
<p>The numbers in the picture are explained here:</p>
<p>1. This edit box receives a semicolon separated list of file extentsions (with a dot in front of each). It usually looks like &#8220;.mpg;.wmv&#8221;. Imo you should not add &#8220;DLL&#8221; or &#8220;MUI&#8221; file extensions there.</p>
<p>2. &amp; 3. These edit boxes receive the source (2.) and target (3.) folders. The source folder defines where to search for the files and the target folder defines where to copy/move them. The source folder structure is retained in the target folder. So if a file is stored in this source folder : &#8220;C:\Windows&#8221; (2.)&#8221; say &#8220;\XXXX\File.wmv&#8221; and your target folder looks like &#8220;E:\temp&#8221; (3.) the new file will be created here: &#8220;E:\Temp\XXXX\File.wmv&#8221;.</p>
<p>4. If this checkbox is checked all files are copied instead of moved. Furthermore the security of the files aren&#8217;t changed at all. So if a file isn&#8217;t accessible an error is shown in the log memo (8.).<br />
This checkbox is only available if you run with administrator privileges; otherwise you aren&#8217;t able to move files.</p>
<p>5.  This checkbox lets you do a simple search. No file is changed or copied/moved. In this way you can find out how many files there are and if there is a file which isn&#8217;t accessible at all.</p>
<p>6. The run button starts the process (with a confirmation prompt). If the search is in progress, you can abort it here.</p>
<p>7. The status area shows some (rare) information.<br />
a) A waiting gradient shows you that something is still going on.<br />
b) A status label shows you the current file processed.<br />
c) A progress bar shows you the current copy/move operation progress.<br />
d) Number of errors and already processed files are shown on the right side of the dialog.</p>
<h3>Mandatory Instruction</h3>
<p>Well, before you start, you should always backup your system (this is mandatory). In the next step you can try to get rid of the media files if you want. But do it at your own risk.</p>
<h3>Appendix</h3>
<p>Yes, I know, there are many other possibilities that can be used to clean the Windows partition. Trust me, I tried them all! The last step would be to buy a new hard disk. <img src='http://blog.delphi-jedi.net/wp-includes/images/smilies/icon_twisted.gif' alt=':twisted:' class='wp-smiley' /> </p>
<h2>Sourcecode</h2>
<p>Source code is available in the example folder of our Subversion repository only.  See Subversion description <a href="http://blog.delphi-jedi.net/2008/03/03/how-to-setup-jwscl/">here</a>.<br />
Direct Subversion (for Checkout) and browser link is <a href="https://jedi-apilib.svn.sourceforge.net/svnroot/jedi-apilib/jwscl/trunk/examples/TakeControl">here</a>.</p>
<h2>Download history</h2>
<p><a href="http://blog.delphi-jedi.net/wp-content/uploads/2009/03/takecontrol.zip">TakeControl Version 0.7</a> (zipped ~700Kib)</p>
<p>Be aware that you run this program at your own risk</p>
<h2>FAQ</h2>
<p>Q:  I can&#8217;t move files because the checkbox isn&#8217;t enabled.<br />
A: You need to run the application as a member of the Administrators group.</p>
<p>Q: I can do the same thing using X.<br />
A: If X doesn&#8217;t include JWSCL or JWA it is not a subject for this blog. You are welcome to post a comment though.</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.delphi-jedi.net/2009/03/10/takecontrol-of-your-files/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Pre-Release of JEDI API 2.2 &amp; WSCL 0.9.2</title>
		<link>http://blog.delphi-jedi.net/2008/08/30/pre-release-of-jedi-api-22-wscl-092-2/</link>
		<comments>http://blog.delphi-jedi.net/2008/08/30/pre-release-of-jedi-api-22-wscl-092-2/#comments</comments>
		<pubDate>Sat, 30 Aug 2008 19:23:31 +0000</pubDate>
		<dc:creator>Christian Wimmer</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[JWA Downloads]]></category>
		<category><![CDATA[JWSCL Downloads]]></category>

		<guid isPermaLink="false">http://blog.delphi-jedi.net/?p=254</guid>
		<description><![CDATA[JEDI API and JWSCL compile with Delphi2009 and also the examples work as far as I could test it. I&#8217;ve created a Subversion branch for each project: JEDI API Version 2.2 pre-release https://jedi-apilib.svn.sourceforge.net/svnroot/jedi-apilib/jwapi/branches/2.2a JEDI WSCL Version 0.9.2 pre-release https://jedi-apilib.svn.sourceforge.net/svnroot/jedi-apilib/jwscl/branches/0.9.2a Download a ZIP package with both projects from SourceForge. Always update this package with a SVN [...]]]></description>
			<content:encoded><![CDATA[<p><strong>JEDI API </strong>and <strong>JWSCL</strong> compile with <strong>Delphi2009</strong> and also the examples work as far as I could test it.</p>
<p><span id="more-254"></span></p>
<p>I&#8217;ve created a <a title="Go get Windows Subversion Client TortoiseSVN" href="http://tortoisesvn.tigris.org/" target="_blank">Subversion</a> branch for each project:</p>
<p><strong>JEDI API Version 2.2 pre-release </strong></p>
<p>https://jedi-apilib.svn.sourceforge.net/svnroot/jedi-apilib/jwapi/branches/2.2a</p>
<p><strong>JEDI WSCL Version 0.9.2 pre-release</strong></p>
<p>https://jedi-apilib.svn.sourceforge.net/svnroot/jedi-apilib/jwscl/branches/0.9.2a</p>
<p>Download a ZIP package with both projects from <a href="http://sourceforge.net/project/showfiles.php?group_id=121894&amp;package_id=251762&amp;release_id=626467">SourceForge</a>. <span style="text-decoration: underline;">Always update this package with a SVN client to get best quality.</span></p>
<p><!--more-->As you can see we abandoned the revision numbers and instead use simple version numbers (as people are more used to those).<em><br />
These pre-releases won&#8217;t be available as packages from sourceforge.net!</em></p>
<p><strong>Please!<br />
We encourage you to use, test and check the released projects!</strong></p>
<p>If you find errors, have problems or questions don&#8217;t hesitate to ask them in the <a href="http://sourceforge.net/mail/?group_id=121894">mailinglist</a>, <a href="news://forums.talkto.net:119/jedi.apiconversion">newsgroup</a>, <a href="http://homepages.codegear.com/jedi/issuetracker/main_page.php">JEDI IssueTracker</a> or send it to <a href="http://mailhide.recaptcha.net/d?k=01MeKrDPlF4UMY4OOGe4JcPA==&amp;c=qu6RnFAF5jjxh0bbfE7ymCJCa5TFUIfZS6RdKFzWmME=">mail[at)delphi-jedi.net</a> .</p>
<p>Regards<br />
Christian Wimmer</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.delphi-jedi.net/2008/08/30/pre-release-of-jedi-api-22-wscl-092-2/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Calculating Binary Hashes using TJwFileStreamEx</title>
		<link>http://blog.delphi-jedi.net/2008/06/17/239/</link>
		<comments>http://blog.delphi-jedi.net/2008/06/17/239/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 08:50:37 +0000</pubDate>
		<dc:creator>NeutralGeneral</dc:creator>
				<category><![CDATA[JEDI Windows Security Code Lib]]></category>
		<category><![CDATA[JWSCL Downloads]]></category>
		<category><![CDATA[JWSCL]]></category>
		<category><![CDATA[Memory Mapped Files]]></category>
		<category><![CDATA[MMF]]></category>
		<category><![CDATA[Streams]]></category>

		<guid isPermaLink="false">http://blog.delphi-jedi.net/?p=239</guid>
		<description><![CDATA[Calculating Binary Hashes using TJwFileStreamEx Why should I use TJwFileStreamEx instead of any other common stream class from the VCL? Well this question is quite easily answered. The first thing is that TJwFileStreamEx is based on Memory Mapped Files (MMF). MMF might be the fastest way to access files on your hard disk. Another good [...]]]></description>
			<content:encoded><![CDATA[<p><span style="font-size: small;"><strong>Calculating Binary Hashes using TJwFileStreamEx</strong></span></p>
<p><strong>Why should I use TJwFileStreamEx instead of any other common stream class from the VCL?</strong></p>
<p>Well this question is quite easily answered.</p>
<p>The first thing is that TJwFileStreamEx is based on Memory Mapped Files (MMF). MMF might be the fastest way to access files on your hard disk. Another good reason for using TJwFileStreamEx is its <em>Memory</em> property which is well known from the VCL <strong>TMemoryStream</strong> class. This property will reduce the effort remarkably.</p>
<p><strong>Getting Started</strong></p>
<p>First you have to include following units to your project:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw1">uses</span> JwsclTypes, JwsclStreams, JwsclCryptProvider;</div>
<p>The signature of our hashing-function looks like this:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw1">function</span> GetFileHash<span class="br0">&#40;</span>Algorithm: TJwHashAlgorithm; <span class="kw1">const</span> Filename: <span class="kw4">String</span><span class="br0">&#41;</span> : <span class="kw4">String</span>;</div>
<p>The first parameter is used to specify the Algorithm which is used to hash the file data. The second parameter defines the path to the file which hash you want to compute.</p>
<p>So what do we need to calculate the hash of a file? All we need is an instance of TJwFileStreamEx to open the file and an instance of TJwHash to calculate the hash:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw1">function</span> GetFileHash<span class="br0">&#40;</span>Algorithm: TJwHashAlgorithm; <span class="kw1">const</span> Filename: <span class="kw4">String</span><span class="br0">&#41;</span> : <span class="kw4">String</span>;<br />
<span class="kw1">var</span><br />
&nbsp; Stream: TJwFileStreamEx;<br />
&nbsp; Hash: TJwHash;<br />
<span class="kw1">begin</span><br />
&nbsp; Stream := TJwFileStreamEx.<span class="me1">Create</span><span class="br0">&#40;</span>Filename,fmOpenRead<span class="br0">&#41;</span>;<br />
&nbsp; <span class="kw1">try</span><br />
&nbsp; &nbsp; Hash := TJwHash.<span class="me1">Create</span><span class="br0">&#40;</span>Algorithm<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="co1">// Calculate and return the Hash as a Hex-String</span><br />
&nbsp; <span class="kw1">finally</span><br />
&nbsp; &nbsp; Hash.<span class="me1">Free</span>;<br />
&nbsp; &nbsp; Stream.<span class="me1">Free</span>; &nbsp;<br />
&nbsp; <span class="kw1">end</span>;<br />
<span class="kw1">end</span>;</div>
<p>This is the basic framework of our function. To calculate the hash of the file we need 2 methods:</p>
<div class="dean_ch" style="white-space: wrap;">TJwHash.<span class="me1">HashData</span><span class="br0">&#40;</span>Data: <span class="kw4">Pointer</span>; Size: <span class="kw4">Cardinal</span><span class="br0">&#41;</span>;<br />
TJwHash.<span class="me1">RetrieveHash</span><span class="br0">&#40;</span>out Len: <span class="kw4">Cardinal</span><span class="br0">&#41;</span>: <span class="kw4">Pointer</span>;</div>
<p>HashData tells our instance of TJwHash which data is to be hashed and which size this data has. RetrieveHash calculates the Hash and retrieves a pointer to the hash data.</p>
<p>Finally we have to free the Buffer using the class method</p>
<div class="dean_ch" style="white-space: wrap;">TJwHash.<span class="me1">FreeBuffer</span><span class="br0">&#40;</span>Buffer: <span class="kw4">Pointer</span><span class="br0">&#41;</span>;</div>
<p>Now our function looks like this:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw1">function</span> GetFileHash<span class="br0">&#40;</span>Algorithm: TJwHashAlgorithm; <span class="kw1">const</span> Filename: <span class="kw4">String</span><span class="br0">&#41;</span> : <span class="kw4">String</span>;<br />
<span class="kw1">var</span><br />
&nbsp; Stream: TJwFileStreamEx;<br />
&nbsp; Hash: TJwHash;<br />
&nbsp; HashSize: <span class="kw4">Cardinal</span>;<br />
&nbsp; HashData: <span class="kw4">Pointer</span>;<br />
<span class="kw1">begin</span><br />
&nbsp; Stream := TJwFileStreamEx.<span class="me1">Create</span><span class="br0">&#40;</span>Filename,fmOpenRead<span class="br0">&#41;</span>;<br />
&nbsp; Hash := TJwHash.<span class="me1">Create</span><span class="br0">&#40;</span>Algorithm<span class="br0">&#41;</span>;<br />
&nbsp; <span class="kw1">try</span><br />
&nbsp; &nbsp; Hash.<span class="me1">HashData</span><span class="br0">&#40;</span>Stream.<span class="me1">Memory</span>,Stream.<span class="me1">Size</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; HashData := Hash.<span class="me1">RetrieveHash</span><span class="br0">&#40;</span>HashSize<span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; TJwHash.<span class="me1">FreeBuffer</span><span class="br0">&#40;</span>HashData<span class="br0">&#41;</span>;<br />
&nbsp; <span class="kw1">finally</span><br />
&nbsp; &nbsp; Hash.<span class="me1">Free</span>;<br />
&nbsp; &nbsp; Stream.<span class="me1">Free</span>;<br />
&nbsp; <span class="kw1">end</span>;<br />
<span class="kw1">end</span>;</div>
<p>At last we need to convert the binary hash into a hex-string:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw1">for</span> i:= <span class="nu0">1</span> <span class="kw1">to</span> HashSize <span class="kw1">do</span><br />
<span class="kw1">begin</span><br />
&nbsp; Result := Result + <span class="kw3">IntToHex</span><span class="br0">&#40;</span><span class="kw4">PByte</span><span class="br0">&#40;</span>HashData<span class="br0">&#41;</span>^,<span class="nu0">2</span><span class="br0">&#41;</span>;<br />
&nbsp; <span class="kw3">inc</span><span class="br0">&#40;</span><span class="kw4">PByte</span><span class="br0">&#40;</span>HashData<span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
<span class="kw1">end</span>;<br />
<span class="kw3">dec</span><span class="br0">&#40;</span><span class="kw4">PByte</span><span class="br0">&#40;</span>HashData<span class="br0">&#41;</span>,HashSize<span class="br0">&#41;</span>; <span class="co1">//neccessary to free HashData</span></div>
<p>Now we&#8217;re done and finally our function looks like this:</p>
<div class="dean_ch" style="white-space: wrap;"><span class="kw1">function</span> GetFileHash<span class="br0">&#40;</span>Algorithm: TJwHashAlgorithm; <span class="kw1">const</span> Filename: <span class="kw4">String</span><span class="br0">&#41;</span> : <span class="kw4">String</span>;<br />
<span class="kw1">var</span><br />
&nbsp; Stream: TJwFileStreamEx;<br />
&nbsp; Hash: TJwHash;<br />
&nbsp; HashSize: <span class="kw4">Cardinal</span>;<br />
&nbsp; HashData: <span class="kw4">Pointer</span>;<br />
&nbsp; i: <span class="kw4">Integer</span>;<br />
<span class="kw1">begin</span><br />
&nbsp; Stream := TJwFileStreamEx.<span class="me1">Create</span><span class="br0">&#40;</span>Filename,fmOpenRead<span class="br0">&#41;</span>;<br />
&nbsp; Hash := TJwHash.<span class="me1">Create</span><span class="br0">&#40;</span>Algorithm<span class="br0">&#41;</span>;<br />
&nbsp; <span class="kw1">try</span><br />
&nbsp; &nbsp; Hash.<span class="me1">HashData</span><span class="br0">&#40;</span>Stream.<span class="me1">Memory</span>,Stream.<span class="me1">Size</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; HashData := Hash.<span class="me1">RetrieveHash</span><span class="br0">&#40;</span>HashSize<span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; <span class="kw1">for</span> i:= <span class="nu0">1</span> <span class="kw1">to</span> HashSize <span class="kw1">do</span><br />
&nbsp; &nbsp; <span class="kw1">begin</span><br />
&nbsp; &nbsp; &nbsp; Result := Result + <span class="kw3">IntToHex</span><span class="br0">&#40;</span><span class="kw4">PByte</span><span class="br0">&#40;</span>HashData<span class="br0">&#41;</span>^,<span class="nu0">2</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; <span class="kw3">inc</span><span class="br0">&#40;</span><span class="kw4">PByte</span><span class="br0">&#40;</span>HashData<span class="br0">&#41;</span><span class="br0">&#41;</span>;<br />
&nbsp; &nbsp; <span class="kw1">end</span>;<br />
&nbsp; &nbsp; <span class="kw3">dec</span><span class="br0">&#40;</span><span class="kw4">PByte</span><span class="br0">&#40;</span>HashData<span class="br0">&#41;</span>,HashSize<span class="br0">&#41;</span>;</p>
<p>&nbsp; &nbsp; TJwHash.<span class="me1">FreeBuffer</span><span class="br0">&#40;</span>HashData<span class="br0">&#41;</span>;<br />
&nbsp; <span class="kw1">finally</span><br />
&nbsp; &nbsp; Hash.<span class="me1">Free</span>;<br />
&nbsp; &nbsp; Stream.<span class="me1">Free</span>;<br />
&nbsp; <span class="kw1">end</span>;<br />
<span class="kw1">end</span>;</div>
<p><strong>How do I use this function?</strong></p>
<div class="dean_ch" style="white-space: wrap;"><span class="co1">// first param can be one of these values:</span><br />
<span class="co1">// haMD2, haMD4, haMD5, haSHA</span><br />
Label1.<span class="me1">Caption</span> := GetFileHash<span class="br0">&#40;</span>haSHA,<span class="st0">&#8216;C:\Progam Files\Program\AFile.ext&#8217;</span><span class="br0">&#41;</span>;</div>
<p><strong>OK, but what is the advantage of TJwFileStreamEx over other Streams?</strong></p>
<p>Well, you don&#8217;t have to load the file into a TMemoryStream and thus the file will not be loaded completely into memory. Furthermore this solution is much faster than a solution using TMemoryStream and similar&#8230;</p>
<h2>Download</h2>
<p><a href="http://blog.delphi-jedi.net/wp-content/uploads/2008/06/jwfilestreamex_demo.zip">Download</a> the source and binaries of this example (260kiB). This includes the new and necessary JWSCL source files. However you need to download the whole package separately.</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.delphi-jedi.net/2008/06/17/239/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>RunAsSYS 1.0 preview [update#1]</title>
		<link>http://blog.delphi-jedi.net/2008/05/08/runassys-10-preview/</link>
		<comments>http://blog.delphi-jedi.net/2008/05/08/runassys-10-preview/#comments</comments>
		<pubDate>Thu, 08 May 2008 19:10:53 +0000</pubDate>
		<dc:creator>Christian Wimmer</dc:creator>
				<category><![CDATA[JWSCL Downloads]]></category>
		<category><![CDATA[JWSCL]]></category>
		<category><![CDATA[RunAsSYS]]></category>
		<category><![CDATA[Token]]></category>

		<guid isPermaLink="false">http://blog.delphi-jedi.net/?p=141</guid>
		<description><![CDATA[This is the preview Version of RunAsSys for Windows XP and Vista made with the help of JWSCL. RunAsSys runs applications as SYSTEM user in the current user&#8217;s session. If you start it without any parameters it creates a command prompt with SYSTEM privileges by default. Otherwise you can add an application with parameters to [...]]]></description>
			<content:encoded><![CDATA[<p>This is the preview Version of RunAsSys for Windows XP and Vista  made with the help of JWSCL.<br />
RunAsSys runs applications as SYSTEM user in the current user&#8217;s session.  If you start it without any parameters it creates a command prompt with SYSTEM privileges by default. Otherwise  you can add an application with parameters to start this process as  SYSTEM user. Use quotation marks if necessary for your path.<br />
On Windows Vista and UAC it should prompt you for elevation. On XP  without Admin privileges it should prompt you for Admin credentials.</p>
<p><strong>Warning</strong>: On Windows XP (and older) the application shows the credential prompt dialog which allows you to run as the same user. If you just click OK button, the application will maybe response one more time but finally stop working. This is due to a bug in ShellExecuteEx with &#8220;runas&#8221; verb.</p>
<h3>UPDATE</h3>
<p><strong>Version 1.1</strong></p>
<p>I publish Version 1.1 which fixes several errors and also makes it available to Windows 64bit systems.<br />
The zip archive contains a 64bit version registry key file that is compatible with WOW64.<br />
RunAsSys contains EurekaLog, which logs internal things. If you get an error, you can send the error report directly to us. However it is not the default behaviour. We use your error report only for improving our software. It will be used internally only and will be finally deleted. No screenshot is taken.</p>
<p><a href="http://blog.delphi-jedi.net/wp-content/uploads/2008/05/runassys111.zip">Download RunAsSys 1.1</a></p>
<p><strong>Version 1.0</strong></p>
<p>Additional Info:<br />
The reg file creates a reg key that is used to enable logging and set  the log output folder (default where exe resides)<br />
It is located in HKEY_LOCAL_MACHINE\SOFTWARE\JEDI\WSCL\RunAsSys\1.0</p>
<p><a href="http://blog.delphi-jedi.net/wp-content/uploads/2008/04/runassys.zip">Download RunAsSYS 1.0</a></p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.delphi-jedi.net/2008/05/08/runassys-10-preview/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>The Delphi JEDI Project needs your help</title>
		<link>http://blog.delphi-jedi.net/2008/04/20/the-delphi-jedi-project-needs-your-help/</link>
		<comments>http://blog.delphi-jedi.net/2008/04/20/the-delphi-jedi-project-needs-your-help/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 20:16:40 +0000</pubDate>
		<dc:creator>Remko</dc:creator>
				<category><![CDATA[Common]]></category>
		<category><![CDATA[JEDI Windows API Headers]]></category>
		<category><![CDATA[JEDI Windows Security Code Lib]]></category>
		<category><![CDATA[JWA Downloads]]></category>
		<category><![CDATA[JWSCL Downloads]]></category>

		<guid isPermaLink="false">http://blog.delphi-jedi.net/2008/04/20/the-delphi-jedi-project-needs-your-help-2/</guid>
		<description><![CDATA[The JEDI API Library project (JWA) has been successfully revived from a sleep status to an active project with lots of ambitions. Some recent achievements are the new include model of JWA, the release of JWSCL (the Security Library) and of course the &#8220;birth&#8221; of this blog. We made a roadmap for JWA and JWSCL [...]]]></description>
			<content:encoded><![CDATA[<p>The JEDI API Library project (JWA) has been successfully revived from a sleep status to an active project with lots of ambitions. Some recent achievements are the new include model of JWA, the release of JWSCL (the Security Library) and of course the &#8220;birth&#8221; of this blog.</p>
<p><span id="more-155"></span></p>
<p>We made a roadmap for JWA and JWSCL which includes &#8220;unicodifying&#8221; (Nick Hodges gave birth to a new word, meaning making the code ready for the next Delphi) and converting new Vista/Server 2008 API&#8217;s.</p>
<p>To help us fullfill these ambitions and continue contributing to the Delphi Community, we are looking for experienced Delphi developers to help us with the following tasks:</p>
<ul>
<li>Maintaining and extending the Jedi API Library (convert new header files, fix errors in existing code).</li>
<li>Maintaining and extending the Jedi Windows Security Code Library (use and test the library, contribute new code, maintain documentation, <em>Active Directory</em>).</li>
<li>Create examples and write blog posts about using JWA and/or JWSCL.</li>
</ul>
<p>See also the <a href="http://blog.delphi-jedi.net/2008/04/09/roadmap-of-jwa-jwscl/">Roadmap</a> for more details.</p>
<p>Of course you will get something back as well: the JEDI projects are very well known and respected in the Delphi Community, so active participation will earn you the respect of the community and is likely to offer additional benefits to your professional career!</p>
<p>Joining the projects means that you will be part of a team where the members actively support and help each other. You can learn a lot from the team&#8217;s knowledge and expertise and we look forward to learning from your knowledge.</p>
<p>If you think you can help us with either JWA, JWSCL or both projects please contact us:<br />
<a href="http://mailhide.recaptcha.net/d?k=01MeKrDPlF4UMY4OOGe4JcPA==&amp;c=qu6RnFAF5jjxh0bbfE7ymCJCa5TFUIfZS6RdKFzWmME="><img src="http://blog.delphi-jedi.net/wp-content/uploads/2008/04/mail-1.gif" alt="mail" width="129" height="12" /></a></p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.delphi-jedi.net/2008/04/20/the-delphi-jedi-project-needs-your-help/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Download RunEl</title>
		<link>http://blog.delphi-jedi.net/2008/03/13/download-runel/</link>
		<comments>http://blog.delphi-jedi.net/2008/03/13/download-runel/#comments</comments>
		<pubDate>Thu, 13 Mar 2008 12:40:27 +0000</pubDate>
		<dc:creator>Christian Wimmer</dc:creator>
				<category><![CDATA[JWSCL Downloads]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[RunEl]]></category>

		<guid isPermaLink="false">http://blog.delphi-jedi.net/2008/03/13/download-runel/</guid>
		<description><![CDATA[RunEl download section Find a description here. Versions and Changelog RunEl 1.0 Application First release Please send bugs to mail@delphi-jedi.net , the mailinglist or the forum.]]></description>
			<content:encoded><![CDATA[<p><u>RunEl download section</u></p>
<p>Find a description <a href="http://blog.delphi-jedi.net/2008/03/13/run-a-program-elevated/">here</a>.</p>
<p>Versions and Changelog</p>
<ul>
<li><a href="http://blog.delphi-jedi.net/wp-content/uploads/2008/03/runel-10.zip" title="RunEl 1.0">RunEl 1.0</a> Application
<ul>
<li>First release</li>
</ul>
</li>
</ul>
<p>Please send bugs to <a href="mailto:mail@delphi-jedi.net">mail@delphi-jedi.net</a> , the <a href="http://sourceforge.net/mail/?group_id=121894" title="Go get more information about our mailinglists.">mailinglist</a> or the <a href="http://sourceforge.net/tracker/?group_id=121894" title="Go to tracker on SF.">forum</a>.</p>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.delphi-jedi.net/2008/03/13/download-runel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>JWSCL Release Revision 316</title>
		<link>http://blog.delphi-jedi.net/2008/03/03/jwscl-release-revision-316/</link>
		<comments>http://blog.delphi-jedi.net/2008/03/03/jwscl-release-revision-316/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 09:55:23 +0000</pubDate>
		<dc:creator>Christian Wimmer</dc:creator>
				<category><![CDATA[JWSCL Downloads]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[JWSCL]]></category>

		<guid isPermaLink="false">http://blog.delphi-jedi.net/2008/03/03/jwscl-release-revision-316/</guid>
		<description><![CDATA[The JEDI Windows Security Code Library Release of Revision 316 is now available to download on Sourceforge. Direct link ~8.5 MiB Also read this and find out how to setup the library! The JWSCL Download also contains the JWAPI Revision 315. Changes: many bugfixes added AuthZ API added Terminal Service API added more examples added extended [...]]]></description>
			<content:encoded><![CDATA[<p>The JEDI Windows Security Code Library Release of Revision 316 is now available to download on Sourceforge.</p>
<p><a title="Download JWSCL" href="http://sourceforge.net/project/showfiles.php?group_id=121894&amp;package_id=249648" target="_blank">Direct link</a> ~8.5 MiB</p>
<p><span style="font-size: small;">Also read <a href="../2008/03/03/how-to-setup-jwscl/">this</a> and find out how to setup the library!<br />
</span></p>
<p>The JWSCL Download also contains the JWAPI Revision 315.</p>
<p>Changes:</p>
<ul>
<li>many bugfixes</li>
<li>added AuthZ API</li>
<li>added Terminal Service API</li>
<li>added more examples</li>
<li>added extended process creation support (JwsclProcess.pas)</li>
</ul>
<!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://blog.delphi-jedi.net/2008/03/03/jwscl-release-revision-316/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
