Posts

New Logo for EIDNative project

Image
Ben De Cat made a logo for EIDNative Library: Thank you Ben! Now EIDNative looks really professional. With support of people like Ben, the development of EIDNative goes really easy and faster.

Belgian eID Middleware SDK 3.5: Delphi edition

Belgian Middleware SDK 3.5 provides set of similar classes for C++, Java and C#, but there is no Delphi support included. In case if you want to use eID SDK from Delphi, I made Delphi wrapper for it with exactly the same classes as it provides for C#.  For using this wrapper you must have eID Middleware and eID SDK 3.5 installed. If you want to avoid such dependency you can use EIDNative Library instead.

National Geographic offers nice wallpapers

Image
From National Geographic wallpapers section :

EIDNative Feature Request

Have an idea for a feature? Check out the EIDNative Feature Request Feedback Forum It allows you to:  View feature requests submitted by other users, and comment on them.  Vote on your favourite feature requests.  Submit your own feature requests for possible inclusion in a future release.

EIDNative - ActiveX version (update)

EIDNativeX is updated. I added the export of card readers list to CSV and fixed some problems related to reading of SIS cards. Download: http://users.telenet.be/serhiy.perevoznyk/download/EIDNativeX.zip

Accessing managed code from native application

// CLRHost.cpp : Hosting managed code in native Windows application // This demo shows how to access the managed code from the native application // and call the C# class method #include "stdafx.h" #include <mscoree.h> int _tmain(int argc, _TCHAR* argv[]) { CComPtr<iclrruntimehost> pHost; DWORD dRetVal; CorBindToRuntimeEx(NULL, NULL, 0, CLSID_CLRRuntimeHost, IID_ICLRRuntimeHost, (void**)&pHost); pHost->Start(); // Once you've loaded and started the CLR, the easiest way to load and run // your managed code is to use the ExecuteInDefaultApp-Domain //method on ICLRRuntimeHost. This will simply load a managed assembly // and execute a method on it: pHost->ExecuteInDefaultAppDomain(L"TestAssembly.dll", L"Test.MyClass", L"Execute", L"Hello", &dRetVal); pHost->Stop(); return 0; }

EIDNative 2.3.0.20 - release

EIDNative Library version 2.3.0.20 is available for download. EIDNative Library is a freeware SDK for Belgian Electronic ID Card. Download link: http://sourceforge.net/projects/eidnative/files/eidnative/EID%20Native%20Library%202.3/EIDLibrarySetup.2.3.0.20.zip/download In this release: C++ version was rewritten almost from scratch Updated Delphi version Updated Delphi documentation Added C++ documentation Fixed some bugs (thanks to René Boesmans)

How to verify Certificate Revocation using EIDNative library

This example receives the raw certificate date from eID card, then convert the raw data to X509Certificate and uses X509Chain for certificate validation. using System; using System.Collections.Generic; using System.Linq; using System.Text; using EIDNative; using System.Security.Cryptography; using System.Security.Cryptography.X509Certificates; using System.IO; namespace Certificates { class Program { static void Main(string[] args) { byte[] rawCertificate; X509Certificate2 certificate; X509Certificate2 caCertificate; X509Certificate2 rootCaCertificate; X509Certificate2Collection certs; EIDCard card = new EIDCard(); card.InitReader(); if (card.IsEIDCard()) { rawCertificate = card.ReadAuthenticationCertificate(); if (rawCertificate.Length > 0) { certs = new X509Certificate2Collection...

EIDExporter update

Image
The new version of EIDExporter is available for download. EIDExporter is a console application that exports data from Belgian eID or SIS card to CSV text file. In this version was added the possibility to select card reader, export the list of card readers to CSV file and store picture apart from other eID data. Download: http://users.telenet.be/serhiy.perevoznyk/download/EIDExporter.zip

Run an application under a specific user account

program RunButAs; {$APPTYPE CONSOLE} {$R *.res} uses Windows, SysUtils; var User, Password, Params : WideString; sUser, sPassword : string; function CreateProcessWithLogonW( lpUsername : LPCWSTR; lpDomain : LPCWSTR; lpPassword : LPCWSTR; dwLogonFlags : DWORD; lpApplicationName : LPCWSTR; lpCommandLine : LPWSTR; dwCreationFlags : DWORD; lpEnvironment : pointer; lpCurrentDirectory : LPCWSTR; var lpStartupInfo : TStartupInfoW; var lpProcessInfo : TProcessInformation ) : boolean; stdcall; external 'Advapi32.dll'; procedure ShowHelp; begin writeln('Run an application under a specific user account'); writeln('Copyright (c) 2009, Serhiy Perevoznyk'); writeln; writeln('Usage : ' + ExtractFileName(ParamStr(0)) + ' <user name=""> [<password>] <command line="">'); halt(1); end; const LOGON_WITH_PROFILE = 1; var si : TStartupInfoW; pi : TProcessInformation; hUserToken:...

Resampling images in Compact Framework

Image
Resizing the image with good quality result is not simple task in CF, because Graphics InterpolationMode property is not supported. For breaking this limitation I developed a new library with the resampling engine made in C++ for ARM processors and a very simple C# wrapper for it. The engine implements a lot of buit-in filters with different speed and result quality. Download: http://users.telenet.be/serhiy.perevoznyk/download/Karna.Compact.Resample.zip The result of the resampling: The original image dimensions 256x256 and resampled image 48x48 Download: http://users.telenet.be/serhiy.perevoznyk/download/Karna.Compact.Resample.zip Note: When using this library you must distribute Resample.dll with your application. Thanks to Carlo Pallini's for his idea of C++ resampling library.

EIDNative 2.3.0.11 - release

EIDNative library 2.3.0.11 is available for download Download: https://sourceforge.net/projects/eidnative/files/eidnative/EID%20Native%20Library%202.3/EIDLibrarySetup.2.3.0.11.zip/download I added in this release of EIDNative an additional function for waiting when the card is inserted and few functions for exporting data from eID and SIS cards to SCV files - the same as for ActiveX version. The ideas for these modifications come from Ben De Cat . An official middleware 3.5 has no compatibility problem with EIDNative. With older versions of middleware EIDNative works using special compatibility mode. In other words, EIDNative does not require the middleware to be installed, but works on PCs with and without the middleware installed. All parts of EIDNative are independent: EIDNativeX (ActiveX version) works without EIDNative, etc...

EIDNative - ActiveX version (update)

I updated an ActiveX version of  EIDNative : fixed ReadSISCard method and added new methods for saving information to CSV file: SaveIDToCSV SaveAddressToCSV SavePersonToCSV SaveSISDataToCSV New methods for controlling card reader were added: GetSelectedReaderIndex SelectReaderByName SelectReader WaitForCardInserted method works now not only with eID card, but with SIS card as well. Download: http://users.telenet.be/serhiy.perevoznyk/download/EIDNativeX.zip

SIS card hardware limitations

Image
An additional remark about reading SIS cards. Not every type of smart card readers able to read SIS cards. You can read SIS card by using ACR 38U card reader, for example.

Export data from eID or SIS card to CSV file

Image
I received the following idea from Ben De Cat: "Nog een idee om het leven van iedereen nog makkelijker te maken, is er geen mogelijk om een (verborgen) commandline applicatie te maken die na aanroep de eiddata wegschrijft naar een csv file..."  and created a new command-line tool for exporting the data from eID or SIS card to CSV file. Download: http://users.telenet.be/serhiy.perevoznyk/download/EIDExporter.zip

EIDNative - ActiveX version

Recently I received the following message: "Ik werkte met powerbuilder 10.5 en een activeX van EIDruntime 2.5 om gegevens van EID te lezen. Sinds runtime versie 3.5 wordt deze activeX (EIDlibctrl) niet meer ondersteund. Ik probeer nu uw native library te laten werken met powerbuilder a.h.v. VB6 voorbeelden, maar heb problemen met de "types" zoals EIDIdentity. Deze worden nl niet ingevuld na oproep functie ReadIDData en krijg geen foutmelding. Powerbuilder werkt met structures i.p.v. types, waarbij dezelfde declaraties gemaakt worden zoals bij EIDIdentity. De volgende functies werken wel: InitReader,DoneReader,IsEIDCard,SavePhotoAsJpeg. Een idee?? " For some programming languages, like VB, the direct usage of EIDNative API can be difficult. Answering some developers requests I created an ActiveX version of EIDNative library for reading the information stored on Belgian electronic ID card and Belgian SIS card. This ActiveX library has no dependencies from EIDN...

PHP4Delphi vs Delphi for PHP. (Part II)

In the comments to my previous post Tim Del Chiaro gave the very interesting explanation how "Delphi for PHP" got its name: "Delphi for PHP got its name because it's the only PHP IDE that offers a development style similar to Delphi for Windows with drag-and-drop visual development and a visual component library. When building the Delphi for PHP IDE, the team took advantage of some of the great Delphi add-ins from the developer community including PHP4Delphi . We're glad we could recognize you and other community members in the about box of the product. If anyone else is interested in Delphi for PHP, they can get more information at http://www.embarcadero.com/products/delphi-for-php "

Write Date value in ExcelWriter

People asking me how to insert the date value into Excel coulmn, but as a date, not just as a text in my C# ExcelWriter class. I extended this class and added 2 additional methods:  public void WriteFormat(string value)  public void WriteCell(int row, int col, DateTime value, int formatIndex) // C# ExcelWriter class v1.1 // by Serhiy Perevoznyk, 2008-2009 using System; using System.Collections.Generic; using System.Text; using System.IO; namespace XLSExportDemo { /// <summary> /// Produces Excel file without using Excel /// </summary> public class ExcelWriter { private Stream stream; private BinaryWriter writer; private ushort[] clBegin = { 0x0809, 8, 0, 0x10, 0, 0 }; private ushort[] clEnd = { 0x0A, 00 }; private void WriteUshortArray(ushort[] value) { for (int i = 0; i < value.Length; i++) writer.Write(value[i]); } /// <summary> //...

PHP4Delphi comeback: version 7.2 released

Today I made a new release of PHP4Delphi . Download version 7.2: http://sourceforge.net/projects/psvlib/files/PHP4Delphi/PHP4Delphi%207.2/php4delphi.7.2.zip/download  Some time ago the development of PHP4Delphi was frozen, but meanwhile I received a lot of questions related to compatibility with latest versions of Delphi and PHP. Finally I decided to make a new release with support of Delphi starting from Delphi 5 till Delphi 2010 and PHP 5.3.0 (both releases for Visual Studio 9 and Visual Studio 6).

PHP4Delphi vs Delphi for PHP

It's the real Comedy of Errors :)  Recently I looked in Google and was surprised how many links pointed to one of the products or the name is mentioned somewhere on the forum when the author means another product. I do understand now CodeGear's point of view (see my second post), but the situations remains the same. I feel that mostly PHP developers use wrong name, because Delphi developers know the difference between "Delphi for PHP" and PHP4Delphi. The best description of this disambiguation was given by Jonathan Benedicto: "Delphi For PHP can run Delphi code, because Delphi For PHP can run PHP code and because PHP code can run Delphi code. This is because PHP can run Delphi code, because a PHP extension can be written in Delphi, using PHP For Delphi's PHP extensions development framework. So, using Delphi For PHP, which, written in Delphi, runs PHP code, using PHP For Delphi, that PHP code, running in Delphi For PHP, can call a PHP extension being PHP...