The source code of Swelio library – the freeware Belgian eID cards access library is available now on GitHub:
https://github.com/perevoznyk/swelio-sdk
In case you are interested in signing PDF documents using Belgian eid card – check Swelio-PDF project: https://wordpress.com/post/perevoznyk.wordpress.com/637
When trying to add the swelio32.dll as a reference in VS Pro 2017 I got following message: “A reference to ‘[path]\Swelio32.dll’ could not be added. Please make sure the file is accessible, and that is a valid assembly or COM component.
Do you have any ideas how to solve this?
Where can I find a VB.NET example?
Thanks
LikeLike
swelio32.dll is a native Windows library, not .NET assembly. You just have to distribute it with your application. The assembly which you have to reference is called Swelio.Engine.dll.
At this moment only C# examples are available.
LikeLike
Thank you,
I did find the solution just a few hours after I posted the question.
Also transformed your C# examples to .NET
LikeLike
It’s very deifficult to find anything related to the Belgian e-iD card. Your library is by far the best I have found. But I’m not used to programming in C# or C++.
Is there any chance you will be issuing a Delphi/Lazarus wrapper and examples like in the past for the Native library?
LikeLike
Ingmar,
I added Delphi wrapper and documentation to Swelio GitHub repository: https://github.com/perevoznyk/swelio-sdk
LikeLike
Super, great. I was looking for the docs, but couldn’t find anything. So I started using the eID native library. Is it outdated with respect to the currently issued cards, or can I still safely use it? Or is it advisable to switch to the Swelio library (using Lazarus)?
LikeLike
eID Native library was acquired by Ortus company: https://perevoznyk.wordpress.com/2010/02/28/ortus-acquires-the-eidnative-library and I do not support it anymore.
LikeLike
I know, I read that. It’s weird that a “device” owned by about 10 M people has such bad support. The official Fedict site support is terrible. No examples, very confusing, all kinds of libraries which may or may not be supported anymore.
Delving into Swelio this evening, ;-).
LikeLike
I tried to make Swelio compatible with eID Native as much as possible, but some changes to the code is necessary.
eID Native was my first attempt to make eID library and I used my experience when started Swelio development. I plan to support it and extend it in the future. The idea is to keep it always backward compatible with previous versions.
LikeLike
Hi Serhiy,
Some time ago ( somewhere around 2009 ) we’ve already been in touch regarding the EIDNative library.
I switched by using your Swelio library a while ago ( again thank you for the excellent work !)
I’m currently using V1.9.0.0 , but I see the latest release is V1.11.0.0.
Do you have a change log or something to point out the differences between versions?
The main reason I’m contacting you was to ask how the date’s are handled within the dll.
I have some issues with EID cards that don’t provide a full date for birth dates.
Instead of dd mmmm yyyy I guess only yyyy is defined for the DOB file on the chip (I’m not completely sure because I can’t get physical access to such an id card at the moment).
Will the dll handle this by passing yyyy0000 or will it simple discard the card an threat it as invalid?
Kind Regards,
Nicky
LikeLike
When Swelio reads id card it handles the dates in the following way:
1. Read date string from card and try to convert it from natural language to YYYYMMDD string
2. If date incomplete or cannot be converted, then it’s stored as-is
3. If month and day are absent, then it replaced by 01 January
4. The resulting date string is converted to date
5. On step 4 the exception is possible if the date is not possible to parse at all
You can catch this exception and add your logic to process invalid date
LikeLike
Hi Serhiy,
I have made a ASP.NET Core website and I’ve used your Swelio. When I run it locally I have to place the Swelio.dll allways in the c:\windows directory… Is that normal?. It works all perfect when I run it locally on localhost:port…. Is it possible to put it on a webserver without problems for example test.company.com\eid? ….. steps I have to make?
For the rest is everything clear and works smoothly.
Kind regards,
Peter
LikeLike
Hello Serhihy, I’ve made an EID app with your nice Swelio library, but I’ve ons question.
With the PictureBox in a desktop app I have no problems to read a picture of a person. In my web application…. Can anybody find a solution to read a picture of a person in an ASP.NET web application. The rest works smoothly.
System.Drawing.Image photo = card.ReadPhoto();
//get the format/file type
string ext = new ImageFormatConverter().ConvertToString(photo.RawFormat);
if (photo != null)
{
picturePerson.Image = photo;
——> here is the problem with the picturebox
——-> I tried to use the asp:Image in Asp.net
}
else
txtErrorMessage.Text = “Can not read EID picture”;
Thx!
LikeLike
Maybe something like this: https://stackoverflow.com/questions/2816580/system-drawing-image-as-source-for-asp-net-image-container ?
LikeLike
Works perfect! 5*
Bedankt 😉
LikeLike
Hi Serhiy,
The object Swelio.Engine.Address does not contain Country, just Municipality, Street and Zip.
This is a problem for reading cards where the Nationality is different from the address. Example: a Dutch person living in Belgium will have Belgian Municipality, Street and Zip, but no Country is given. I can’t use Swelio.Engine.Identity.NationalityISO, because that would give me “Netherlands”.
Can you verify that this is because this information is just not available on the card, or is it possible to add the Country to the Address object?
Thanks,
Rogier
LikeLike