I use Philip's MfRc500.dll for communicating with RFID chips. It contains a function for reading data, which is defined like this:
signed char Mf500PiccRead(unsigned char addr, unsigned char * data)
I use it in VB.NET like this:
Private Declare Function RFID_PiccRead Lib "MfRc500.dll" Alias "_Mf500PiccRead@8" (ByVal addr As UShort, ByRef value As Long) As Short
and then a wrapper:
Public Function PiccRead(ByVal addr As UShort, ByRef value As Long) As Short
Return RFID_PiccRead(addr, value)
End Function
The second parameter in function Mf500PiccRead can returns "16 byte data block", so my long data type is too small. If I use byte() instead of long, then i get ExecutionEngineException Exception.
Which data type should I use and how?