c# marshal , return uint value on parameters : I have c# code that call to c dll (dllimport) .

I want the c return value on the parametes.

c# code:

    uint x=0;
    Func(x);

c code:

    void Func(size_t x)
    {
       x=8;
    }

I want the c# get value 8 to x .

I tried:

     [DllImport("1.dll")]
     public static extern void Func(size_t x);


but after the c# finish with Func function the var x still 0

what can I do please?

