In the SDK, have a look at the mgdinterop header file (and include it in your projects) for some typical conversions of typical items commonly used in these situations.
here's an example of getting an object id that I used to store objects in an array
//in the header:
public:
void AddId(ObjectId entId); //add managed objId's to id array
private:
AcDbObjectIdArray* _ids; //native storage of ObjId's
//------------------------------------------------------------------------------------//
//- in the cpp
void DCS_3D::HlrEngine::DCS2dEngine::AddId(ObjectId entId)
{
_ids->append(GETOBJECTID(entId));// use managed macro to convert id types
}
I've used this to write a very basic wrapper of some functions and classes, basically you just need a pointer to the native object inside your wrapper class and you can handle marshaling the input/output with those macros and methods in the mgdinterop.h
hth,
Mick.