#include "stdafx.h"
using namespace System;
value class Test
{
public:
int i;
};
#pragma unmanaged
void incr (int *i)
{
(*i) += 10;
}
#pragma managed
void main ()
{
Test ^test = gcnew Test();
interior_ptr ip = &test->i;
(*ip) = 5;
pin_ptr i = ip;
incr( i );
Console::WriteLine ( test->i );
}