public static unsafe extern IntPtr CFNumberCreate(IntPtr theAllocator, CFNumber.CFNumberType theType, int* valuePtr);
public static bool UpdateTime(IntPtr device, double time) { int sec = Convert.ToInt32(time); CFString domain = new CFString("NULL"); CFString key = new CFString("TimeIntervalSince1970"); IntPtr p = AMDeviceCopyValue(device, domain, key); string n = new CFNumber(p).ToString(); CFNumber value = new CFNumber(sec); return AMDeviceSetValue(device, domain, key, value) == NO_ERR; }