if ObjectId in the .Net world == AcDbObjectId in the C++ world, then ads_name != ObjectId.
You have to use the .Net equivalent of these C++ API's
acdbGetObjectId(AcDbObjectId & objId, ads_name objName) or
acdbGetAdsName(ads_name & objName, AcDbObjectId objId) to go the other way around.
Under the covers ads_name is 2 32 bit longs in 32 bit Autocad and 2 64 bit longs in 64 bit acad.
Up to 2007,
typedef long ads_name[2];
2008+,
#ifndef _WIN64
typedef __w64 long ads_name[2];
typedef __w64 long *ads_namep;
#else
typedef __int64 ads_name[2];
typedef __int64 *ads_namep;
#endif
(mental juggling here, about how TT's code would work)
But that really doesn't matter since the 128 bit ads_name of .Net will comfortably fit the 64 bit ads_name of 32 bit Acad, so they are compatible.