private static String getMacString(CF cf, Pointer ref) {
    var length = (int)cf.CFStringGetLength(ref);
    var buffer = new char[length];
    cf.CFStringGetCharacters(ref, new CF.CFRange(0, length), buffer);
    return new String(buffer);
  }
private static String getMacString(CF cf, Pointer ref)