internal static extern CFDictionaryRef CFDictionaryCreate( CFAllocatorRef allocator, CFStringRef[] keys, CFNumberRef[] values, CFIndex numValues, ref CFDictionary.CFDictionaryKeyCallBacks keyCallBacks, ref CFDictionary.CFDictionaryValueCallBacks valueCallBacks );
internal static string CFStringGetCString(IntPtr cfstr) { CFIndex length = CFStringGetLength(cfstr); if (length != IntPtr.Zero) { byte[] utf8_chars = new byte[length.ToInt32() + 1]; if (CFStringGetCString(cfstr, utf8_chars, new IntPtr(utf8_chars.Length), CFStringEncoding.UTF8)) { return(Encoding.UTF8.GetString(utf8_chars)); } } return(String.Empty); }
internal static extern IOReturn IOHIDDeviceGetReport( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, IntPtr report, IntPtr pReportLength);
internal static extern IOReturn IOHIDDeviceSetReport( IOHIDDeviceRef device, IOHIDReportType reportType, int reportID, IntPtr report, CFIndex reportLength);// AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
internal static extern CFDictionaryRef CFDictionaryCreate ( CFAllocatorRef allocator, CFStringRef[] keys, CFNumberRef[] values, CFIndex numValues, ref CFDictionary.CFDictionaryKeyCallBacks keyCallBacks, ref CFDictionary.CFDictionaryValueCallBacks valueCallBacks );
//extern static IntPtr CFArrayCreate (IntPtr allocator, IntPtr values, CFIndex numValues, IntPtr callbacks); internal static extern IntPtr CFArrayCreate (CFAllocatorRef allocator, IntPtr[] values, CFIndex numValues, CFArrayCallBacks callbacks);
internal static extern CFRunLoopSourceRef MachPortCreateRunLoopSource( CFAllocatorRef allocator, CFMachPortRef port, CFIndex order);
internal static extern Boolean CFStringGetCString( CFStringRef theString, byte[] buffer, CFIndex bufferSize, CFStringEncoding encoding );
extern static bool CFHTTPMessageAppendBytes(IntPtr message, ref byte[] newBytes, CFIndex numBytes);
internal static extern IOReturn IOHIDDeviceSetReport( IOHIDDeviceRef device, IOHIDReportType reportType, int reportID, IntPtr report, CFIndex reportLength); // AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
//extern static IntPtr CFArrayCreate (IntPtr allocator, IntPtr values, CFIndex numValues, IntPtr callbacks); internal static extern IntPtr CFArrayCreate(CFAllocatorRef allocator, IntPtr[] values, CFIndex numValues, CFArrayCallBacks callbacks);