G
Guest
Greetings,
When working with managed c++, do you have to do anything special when going
from simple types from managed to unmanaged and vice versa. Or is
marshalling handled automatically for you?
I have seen from several posts that you have to do special conversions for
strings, but what about the other types such as int, long,ect. In my case I
want to save it as a member variable from a managed class into an unmanaged
class's.
(ie
// Managed function calls a pointer to a unmanaged class's function.
void TestNum(int newNum)
{
// Call unmanaged class's function.
pMyUnmanagedClass->UpdateNewNum(newNum);
}
void CMyUnmanagedClass::UpdateNewNum(int nNumber)
{
// Do I have to do anything special here????
// Or is this handled through the marshalling?
m_nMemberTest = nNumber;
}
Thanks in advance!
When working with managed c++, do you have to do anything special when going
from simple types from managed to unmanaged and vice versa. Or is
marshalling handled automatically for you?
I have seen from several posts that you have to do special conversions for
strings, but what about the other types such as int, long,ect. In my case I
want to save it as a member variable from a managed class into an unmanaged
class's.
(ie
// Managed function calls a pointer to a unmanaged class's function.
void TestNum(int newNum)
{
// Call unmanaged class's function.
pMyUnmanagedClass->UpdateNewNum(newNum);
}
void CMyUnmanagedClass::UpdateNewNum(int nNumber)
{
// Do I have to do anything special here????
// Or is this handled through the marshalling?
m_nMemberTest = nNumber;
}
Thanks in advance!