Get Firmware String

Forums SA Series Discussions Get Firmware String

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #157751
    Mallaug
    Participant

    Trying to get the firmware version from a SA44B. Spike says it is 2.12. I must be doing something wrong….

    I’m using C# and this code, but I’m only getting Zeros:

     public static string saGetFirmwareString(int device)
        {
            char[] firmware_version = new char[16];
            if (saGetFirmwareString(device, firmware_version) == saStatus.saNoError)
                return new string(firmware_version);
            return "";
        }
     [DllImport("sa_api.dll", CallingConvention = CallingConvention.Cdecl)]
        public static extern saStatus saGetFirmwareString(int device, char[] version);
    #157766
    AndrewAndrew
    Moderator

    Hello Mallaug,

    Since Spike also uses the API to retrieve the firmware string and is working for you, it would lead me to believe the issue is probably in the C# interop.

    Hopefully someone here has enough C# experience to answer your question. You might also try searching online with search terms like “PInvoke char pointer parameter” or similar. It seems to bring up a lot of relevant results.

    Regards,
    Andrew

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.