public static string CanonicalizeRef(int refId) { var re = ScriptHost.CanonicalizeRef(refId, ms_instanceId); var str = Marshal.PtrToStringAnsi(re); GameInterface.fwFree(re); return(str); }