Convert VarPtr code in c# to c
Hello!
can anybody helpme to resolve this, i tried to parse this c# code to c, but i failed.
public static int VarPtr(object e)
{
GCHandle GC = GCHandle.Alloc(e, GCHandleType.Pinned);
int gc = GC.AddrOfPinnedObject().ToInt32();
GC.Free();
return gc;
}
what exactly do these,and how i can write in c.
sorry, my english is bad.