gpio.Gpio_Open(hGPIO) always return FALSE

    public bool InitializeLibraries()
    {
        bool isInitialized = false;
        try
        {
            hGPIO = gpio.Gpio_Init(null); ///< Initialize GPIO library.
            if (hGPIO != null)
            {
                isInitialized = gpio.Gpio_Open(hGPIO); ///< **-- always return false**
                if (isInitialized.Equals(true))
                {
                    pin = new gpio.uIo();
                    pin.type = (ushort)gpio.tIoType.ioColibriPin;
                    pin.number = 101;
                    gpio.Gpio_ConfigureAsGpio(hGPIO, pin); ///<configure provided sodimm pin as gpio
                }
            }
        }
        catch
        {
        }
        return isInitialized;
    }

Please anyone can help ?

@Dhananjay If I am correct you are working on Colibri T20 module, and API’s you have implemented in your application is meant to work for Vybrid and iMX6 modules.

Please use correct library: Toradex CE Libraries and Code Samples | Toradex Developer Center

Note: Please do mention complete details about your platform( module, image, carrier board, application details) always whenever you write post new question on community so that anyone can answer your queries.

Its working after I have used the old dll ie “GpioLib.dll” in new Toradex sdk

Hello Dhananjay,
I am trying to implement mentioned CODE, but getting message of " Unable to open GPIO, check if handle is valid". Can you please know me the exact problem?

using System;
using System.Linq;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Runtime.InteropServices;

namespace Gpio_Demo_Csharp
{
    static class Program
    {
        
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [MTAThread]
        static void Main()
        {   
            Application.Run(new Form1());
        }
    }
}