Serializing Active X Controls

Posted by Khanfair under ASP.NET on 4/30/2007 | Views : 3351 | Status : [Member] | Replies : 1
I am working on FingerReader.
i have sample version of GrFingerReader's ActiveXDll from
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
_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=,

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?


Posted by: Vuyiswamb on: 4/24/2009 [Member] [MVP] [Administrator] NotApplicable

Good Afternoon

Here is your Solution here

Thank you For Posting at Dotnetfunda

We are apologise for replying to your post so late

Vuyiswa Maseko

Thank you for posting at Dotnetfunda

Khanfair, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response