Support for Mobile OS

Mar 2, 2010 at 3:09 PM


Is it possible to use this with WinCE?

Main difference I believe is regarding the .NET Framework (since for Mobile you use .NET Compact Framework).

Also, the encapsulated methods are supported only on non-Mobile environments?





Mar 3, 2010 at 4:31 AM
Edited Mar 3, 2010 at 8:53 AM


Short answer is no and mainly because of the Middleware not being available for Windows Mobile.

I don't have experience in developing native mobile applications, so I'm not 100% sure of what is doable, however here is what I investigated:

Mixed mode assemblies run on Compact Framework, so this Wrapper should run fine, even the SCWatcher (
Even if not, splitting into two DLLs and creating a purely managed Wrapper can be done to solve the hipotetical mixed-mode assembly issue.

If you just want to extract the Citizen's Public Information you can try to use the pteidlib_dotnet.dll or eIDPT .NET on a Windows Mobile and see if you can retrieve the data.
If you're looking into signing documents, authentication or access the Citizen Address, if you can't setup the Official Middleware on Mobile, no Crypto API for you !

More on Cryptography and Windows Crypto API
All the Crypto Service Provider mandatory entry points are implemented by the PTEID CSP according to:
Even if it wasn't, ow the PTEID OpenSC fork is a supported fork and is implemented out-of-the-box ( If I grasp the concepts, this along with the new January 2010 OpenSC being compatible with Windows BaseSCP ( and the new Minidriver ( allows the possibility for Independent Middlewares for Cryptographic operations with the Portuguese eID Card on Windows.
That is: OpenSC (+ MiniDriver) implements all the needs for supporting the use of eID Certificates on Windows.
With that said, it can be possible to retrieve Citizen Information using OpenSC, but probably a new C++ dll needs to be developed to wrap things.

Hope it helps.

Best regards,

Mar 10, 2010 at 3:18 PM

Hello Fernando,

Thank you very much for your quick reply.

What I want to achieve for now is something really simple, to check the capabilities of a special device that is running WinCE.


So basically I just want to have access to the Public Information (mostly biographical and disregarding address and Crypto for now).

I built a simple application using the eidpt.dll, but I keep getting the same error message when invoking SODChecking (for instance); The exception message is "MissingMethodException", and it does not provide more information, I believe due to .NETCF "cutbacks" to achieve the "compact" status.


Another approach that I was wondering if it's possible is accessing the Smart Card directly.

I've read a few things over the web, but I guess that all comes down to using APDU commands. Are you aware of anything like this?


Again, thank you for your help.


Kind regards,


Mar 11, 2010 at 7:15 PM
Edited Mar 11, 2010 at 7:41 PM

It doesn't necessarily map to .NET Compact Framework, as it can be related with WinAPI methods.
Have you tried with the official PTEID .NET Library instead of our eidpt.dll ? Their implementation is purely C only exposing Managed Objects, so.. it might work.

About the APDU commands, that is completly out of my scope, however some heads up:
You may have some hard time to figure out the structure of the data on the Smart Card.. and other stuff like that. As far as I know, those mappings aren't even public...
If you go down that road, check out what the Linux/Mac community has done. Maybe there is some raw apdu command wrapper that reads citizen data already made.

And whatever you find or breaktroughs you make, you're welcome to post them here.

Hope it helps,