I write MFC-DLL, it have a export fuction :
----------
void Test(int n)
{
n=100;
}
----------


I user this DLL in VB:
----------
n=200
'Call Test fuction :
Test(n)

MsgBox n
'But n is not changed (n = 200)
'Why n is not = 100?
----------

I repaired fuction Test as :

void Test(int &n)
{
n=100;
}

When call Test(n) in VB, occur an error : access memory....

Why that?
How can I do to changed value of n?

Thank you!