I found it better to use the old Managed C ++ style for this.
CLR:PURE just doesn't cut it.
Example:
extern "C" int _foo(int bar)
{
return bar;
}
namespace Bar
{
public __gc class Foo
{
public:
Foo() {}
static int foo(int bar)
{
return _foo(bar);
}
};
};
Compile with: /clr:oldSyntax
Now you can reference assebmly and call Bar.Foo.foo()from .NET.
source
share