I've got an executionengineexception. help!

saulwig

New member
Joined
Jul 29, 2010
Messages
1
Programming Experience
Beginner
Hi,

Hi there,

I am a low level programmer who is having some difficulty upgrading a software development kit for a RFID reader from vb6 to vb.net. The original code is:

Public Type TagIDs

TagType As Byte
AntNum As Byte
Ids(11) As Byte
End Type


i need to pass this type to a function in dll..


so that i created obj array for that ..


Dim TagIDs(100) As TagIDs

result = DrfGen2MultiTagIdentify(hCom, CountOfTags, TagIDs(0), 255)

when i execute the line its returning values perfectly..

but i tried to do the same code in Visual Studio 2008..
its throwing exception as like below..
"Exception of type 'System.ExecutionEngineException' was thrown..."

my .net code is..

Public Structure TagIDs Dim TagType As Byte Dim AntNum As Byte <VBFixedArray(11)> Dim Ids() As Byte Public Sub SInitialize() ReDim Ids(11) End Sub End Structure

Dim TagIDs_Renamed(100) As TagIDs Call TagIDs_Renamed(0).SInitialize()

result = DrfGen2MultiTagIdentify(hCom, CountOfTags, TagIDs_Renamed(0), 255)

The function DrfGen2Multitagidentity(hCom, count of tags, tagIDs(0), 255) came with the SDK and is stored in a .dll. The description of the function in the manual is:

3.1 Gen2MultiTagIdentify

Function EPC GEN2 multi-tag Identification contains repeat data filtration.

Parameter Count: tag quantity being identified this time; value: tag data

Return Value Success return 0,fail return not 0

Example Refer to IsoMultiTagIdentify application example

This function is called and successfully returns a fail value on successive iterations. I think the exception is thrown when a successful read value is returned.

I've been racking my brain for 2 days now on this problem. The main problem i have is that i don't understand what could possibly be causing the executionenginerexception as they are quite an exotic type. Any help on this would really save my bacon.
 
Back
Top