DllExport int getClassId(void* ptrObj)
{
  return ((MgObject*)ptrObj)->GetClassId();
}