Search code examples
c#compact-frameworkdevice

How to know if the device is MC9090G with RFID or not in C#


I'm developing in C# for devices MC9090G and I'm trying to know in my code if the device has or not RFID to load determined drivers; I've used SPI_GETOEMINFO from the coredll.lib library but this returns the same model: "MC9090G" for both devices, how can I know which one has RFID?


Solution

  • After looking for solutions to distinguish between devices with RFID or not, I used the Symbol.RFID.dll assembly to create an RFID.Reader instance:

    Symbol.RFID.Reader info = new Symbol.RFID.Reader();
    

    So, when the device doesn't have RFID this line throws a System.Exception 'exception'; so I'm handling this exception to do what I want with devices without RFID.

    I know this try catch is not the best solution, but it worked for me.

    Thanks everybody for having answered.