VF61 GPIO on C#

I’m doing an app to read / write analog and digital inputs. But I found no example using C #. Following the model TdxAllLibraries.dll rode the example below, but does not work.

can anyone help me to use this dll with C #?

//create a uIO PIN 
gpio.uIo pin = new gpio.uIo();
pin.ColibriPin.nr = 103;
pin.ColibriPin.tp = 1;  //< direction: ioInput = 0,  ioOutput = 1  

//init GPIO
IntPtr gpHandle = gpio_vyb.VybGpio_Init(null);

//set pin to Hi
gpio_vyb.VybGpio_SetLevel(gpHandle, pin, gpio.tIoLevel.ioHigh);

//Deinit GPIO

Dear Okama,

In the code above you have not configured pin correctly. First, you need to configure pin as GPIO (VybGpio_ConfigureAsGpio ()) and then you need to set pin direction (VybGpio_SetDir()) as output later you can set the pin level (VybGpio_SetLevel())
Download sample GPIO test code for Vybrid libraries, hope this will help you.

Thanks, now its works as I need.