Suppose there is a void MyFunc() C++ function you need to call from .NET. The DllImport call will only recognize it if the function is declared with dllexport modifier.
extern "C" __declspec( dllexport ) void MyFunc()
It is also possible pass a .NET AutoCAD Entity to C++ unmanaged, just declare the function with a pointer and use UnmanagedObject property from .NET.
C++
extern "C" __declspec( dllexport ) void MyFunc(AcDbLine* line)
.NET
[DllImport("MyArxModule.arx",
CallingConvention = CallingConvention.Cdecl,
CharSet = CharSet.Unicode)]
private static extern void MyFunc(System.IntPtr line);
[CommandMethod("myCommand")]
static public void CmdCallCommand()
{
Line l = // do something here...
MyFunc(l.UnmanagedObject);
}