I am working on FingerReader.
i have sample version of GrFingerReader's ActiveXDll from www.Griaule.com.
I need to send it's control(AxGrFingerCtrl) to method in WebService.
We have referenced GrFingerXLib ActiveXDll in our project.
Public Sub ConvertFingerXCtrl2Object()
Dim obj As New Object
Dim fsFingerX As FileStream
Dim bfFingerX As New BinaryFormatter
Dim val As Integer = GRConstants.GR_MAX_SIZE_TEMPLATE
Dim bytegrFinger(GRConstants.GR_MAX_SIZE_TEMPLATE) As Byte
Dim _GrFingerX As New AxGrFingerXLib.AxGrFingerXCtrl
Try
_GrFingerX = AxTest.RetGrFingerX() 'returns AxGrFingerXCtrl
fsFingerX = New FileStream(Application.StartupPath & "FingerX.bin", FileMode.Create)
bfFingerX.Serialize(fsFingerX, _GrFingerX)
fsFingerX.Seek(0, 0)
fsFingerX.Read(bytegrFinger, 0, bytegrFinger.Length)
Catch ex As Exception
MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK)
End Try
End Sub
Exception raised is:
Type 'AxGrFingerXLib.AxGrFingerXCtrl' in assembly 'AxInterop.GrFingerXLib, Version=1.0.0.0,
Culture=neutral, PublicKey Token=null' is not marked as serializable.
Please, Can you tell me it is possible to serialize this type of control or not?