Hi,

Im trying to use the Belgian Eid Middleware on the compact framework,
My code works on framework 1.1 but in compact framework ik keep getting a
'System.NotSupportedException' error.
(This is only one function from the eidlib.dll, the one to intitialize)
Does anyone has an idea what that could be.

thnx & greetz

more info on the belgian Eid can be found here :
http://eid.belgium.be/en/navigation/12000/index.html
http://www.belgium.be/zip/eid_datacapture_nl.html

http://download.microsoft.com/download/4/f/d/4fd49a94-8772-4bd0-88ca-bf46e2d029fc/WHITEPAPERS/Accessing%20the%20eID%20Middleware%20from%20.NET%20(Version%201.0).doc

This is my eidlibdotnet class

<StructLayout(LayoutKind.Sequential)> _
Public Structure Status
Public General As UInt32
Public System As UInt32
Public PCSC As UInt32
Public CSW As UInt16
Public RFU1 As UInt16
Public RFU2 As UInt16
Public RFU3 As UInt16
End Structure

Public Declare Function BEID_InitEx Lib "Eidlib.dll" ( _
ByVal readerName As String, _
ByVal ocsp As OCSPPolicyOptions, _
ByVal crl As CRLPolicyOptions, _
ByRef cardHandle As IntPtr, _
ByVal interfaceVersion As Integer, _
ByVal interfaceCompVersion As Integer) As Status

and this is the code in my form :

Dim eid As New eidlibdotnet
Dim retstatus As eidlibdotnet.Status
Dim tmp As New IntPtr
retstatus = eid.BEID_InitEx("VIRTUAL", 0, 0, tmp, 1, 1)

RE: trying to use eidlib.dll for compact framework by bjorn

bjorn
Wed Aug 24 17:33:26 CDT 2005

oh yeah, forgotten these

Public Enum OCSPPolicyOptions As Integer
NotUsed = 0
OptionalT = 1
Mandatory = 2
End Enum

Public Enum CRLPolicyOptions As Integer
NotUsed = 0
OptionalT = 1
Mandatory = 2
End Enum

"bjorn" wrote:

> Hi,
>
> Im trying to use the Belgian Eid Middleware on the compact framework,
> My code works on framework 1.1 but in compact framework ik keep getting a
> 'System.NotSupportedException' error.
> (This is only one function from the eidlib.dll, the one to intitialize)
> Does anyone has an idea what that could be.
>
> thnx & greetz
>
> more info on the belgian Eid can be found here :
> http://eid.belgium.be/en/navigation/12000/index.html
> http://www.belgium.be/zip/eid_datacapture_nl.html
>
> http://download.microsoft.com/download/4/f/d/4fd49a94-8772-4bd0-88ca-bf46e2d029fc/WHITEPAPERS/Accessing%20the%20eID%20Middleware%20from%20.NET%20(Version%201.0).doc
>
> This is my eidlibdotnet class
>
> <StructLayout(LayoutKind.Sequential)> _
> Public Structure Status
> Public General As UInt32
> Public System As UInt32
> Public PCSC As UInt32
> Public CSW As UInt16
> Public RFU1 As UInt16
> Public RFU2 As UInt16
> Public RFU3 As UInt16
> End Structure
>
> Public Declare Function BEID_InitEx Lib "Eidlib.dll" ( _
> ByVal readerName As String, _
> ByVal ocsp As OCSPPolicyOptions, _
> ByVal crl As CRLPolicyOptions, _
> ByRef cardHandle As IntPtr, _
> ByVal interfaceVersion As Integer, _
> ByVal interfaceCompVersion As Integer) As Status
>
> and this is the code in my form :
>
> Dim eid As New eidlibdotnet
> Dim retstatus As eidlibdotnet.Status
> Dim tmp As New IntPtr
> retstatus = eid.BEID_InitEx("VIRTUAL", 0, 0, tmp, 1, 1)
>

Re: trying to use eidlib.dll for compact framework by Chris

Chris
Wed Aug 24 17:39:28 CDT 2005

I see a Windows version, but nothing for Windows CE. Did you port and
recompile the EID stuff for CE/Compact Framework? You can't just call into
a desktop library.

--
Chris Tacke
Co-founder
OpenNETCF.org
Are you using the SDF? Let's do a case study.
Email us at d c s @ o p e n n e t c f . c o m
http://www.opennetcf.org/donate


"bjorn" <bjorn@discussions.microsoft.com> wrote in message
news:EAACACA1-38E3-4240-81E1-F86050950AEA@microsoft.com...
> Hi,
>
> Im trying to use the Belgian Eid Middleware on the compact framework,
> My code works on framework 1.1 but in compact framework ik keep getting a
> 'System.NotSupportedException' error.
> (This is only one function from the eidlib.dll, the one to intitialize)
> Does anyone has an idea what that could be.
>
> thnx & greetz
>
> more info on the belgian Eid can be found here :
> http://eid.belgium.be/en/navigation/12000/index.html
> http://www.belgium.be/zip/eid_datacapture_nl.html
>
> http://download.microsoft.com/download/4/f/d/4fd49a94-8772-4bd0-88ca-bf46e2d029fc/WHITEPAPERS/Accessing%20the%20eID%20Middleware%20from%20.NET%20(Version%201.0).doc
>
> This is my eidlibdotnet class
>
> <StructLayout(LayoutKind.Sequential)> _
> Public Structure Status
> Public General As UInt32
> Public System As UInt32
> Public PCSC As UInt32
> Public CSW As UInt16
> Public RFU1 As UInt16
> Public RFU2 As UInt16
> Public RFU3 As UInt16
> End Structure
>
> Public Declare Function BEID_InitEx Lib "Eidlib.dll" ( _
> ByVal readerName As String, _
> ByVal ocsp As OCSPPolicyOptions, _
> ByVal crl As CRLPolicyOptions, _
> ByRef cardHandle As IntPtr, _
> ByVal interfaceVersion As Integer, _
> ByVal interfaceCompVersion As Integer) As Status
>
> and this is the code in my form :
>
> Dim eid As New eidlibdotnet
> Dim retstatus As eidlibdotnet.Status
> Dim tmp As New IntPtr
> retstatus = eid.BEID_InitEx("VIRTUAL", 0, 0, tmp, 1, 1)
>



Re: trying to use eidlib.dll for compact framework by bjorn

bjorn
Wed Aug 24 18:40:01 CDT 2005

no,
i tought you could use the dll when you wrap it with P invoke
im very new to compact framlework.

I dont have the source for that dll so i cant recompile it.
so it isnt possible to use the eid card on compact framework untill they
release an cf compiled dll?

will this be possible with the new compact framework2?

"Chris Tacke, eMVP" wrote:

> I see a Windows version, but nothing for Windows CE. Did you port and
> recompile the EID stuff for CE/Compact Framework? You can't just call into
> a desktop library.
>
> --
> Chris Tacke
> Co-founder
> OpenNETCF.org
> Are you using the SDF? Let's do a case study.
> Email us at d c s @ o p e n n e t c f . c o m
> http://www.opennetcf.org/donate
>
>
> "bjorn" <bjorn@discussions.microsoft.com> wrote in message
> news:EAACACA1-38E3-4240-81E1-F86050950AEA@microsoft.com...
> > Hi,
> >
> > Im trying to use the Belgian Eid Middleware on the compact framework,
> > My code works on framework 1.1 but in compact framework ik keep getting a
> > 'System.NotSupportedException' error.
> > (This is only one function from the eidlib.dll, the one to intitialize)
> > Does anyone has an idea what that could be.
> >
> > thnx & greetz
> >
> > more info on the belgian Eid can be found here :
> > http://eid.belgium.be/en/navigation/12000/index.html
> > http://www.belgium.be/zip/eid_datacapture_nl.html
> >
> > http://download.microsoft.com/download/4/f/d/4fd49a94-8772-4bd0-88ca-bf46e2d029fc/WHITEPAPERS/Accessing%20the%20eID%20Middleware%20from%20.NET%20(Version%201.0).doc
> >
> > This is my eidlibdotnet class
> >
> > <StructLayout(LayoutKind.Sequential)> _
> > Public Structure Status
> > Public General As UInt32
> > Public System As UInt32
> > Public PCSC As UInt32
> > Public CSW As UInt16
> > Public RFU1 As UInt16
> > Public RFU2 As UInt16
> > Public RFU3 As UInt16
> > End Structure
> >
> > Public Declare Function BEID_InitEx Lib "Eidlib.dll" ( _
> > ByVal readerName As String, _
> > ByVal ocsp As OCSPPolicyOptions, _
> > ByVal crl As CRLPolicyOptions, _
> > ByRef cardHandle As IntPtr, _
> > ByVal interfaceVersion As Integer, _
> > ByVal interfaceCompVersion As Integer) As Status
> >
> > and this is the code in my form :
> >
> > Dim eid As New eidlibdotnet
> > Dim retstatus As eidlibdotnet.Status
> > Dim tmp As New IntPtr
> > retstatus = eid.BEID_InitEx("VIRTUAL", 0, 0, tmp, 1, 1)
> >
>
>
>

Re: trying to use eidlib.dll for compact framework by Adam

Adam
Wed Aug 24 19:19:38 CDT 2005

If the dll is written for the desktop only then you cannot use from Compact
Framework. If they produce a version for the handheld then you can P/Invoke
call it from Compact Framework.