Function

IOHIDValueCreateWithBytesNoCopy

Creates a new element value using byte data without performing a copy.

Declaration

IOHIDValueRef IOHIDValueCreateWithBytesNoCopy(CFAllocatorRef allocator, IOHIDElementRef element, uint64_t timeStamp, const uint8_t *bytes, CFIndex length);

Parameters

allocator

The CFAllocator which should be used to allocate memory for the value. This parameter may be NULL in which case the current default CFAllocator is used. If this reference is not a valid CFAllocator, the behavior is undefined.

element

IOHIDElementRef associated with this value.

timeStamp

OS absolute time timestamp for this value.

bytes

Pointer to a buffer of uint8_t to be referenced by this object.

length

Number of bytes in the passed buffer.

Return Value

Returns a reference to a new IOHIDValueRef.

Discussion

The timestamp value passed should represent OS AbsoluteTime, not CFAbsoluteTime. To obtain the OS AbsoluteTime, please reference the APIs declared in <mach/mach_time.h>

See Also

Miscellaneous

IOHIDValueCreateWithBytes

Creates a new element value using byte data.

IOHIDValueCreateWithIntegerValue

Creates a new element value using an integer value.

IOHIDValueGetBytePtr

Returns a byte pointer to the value contained in this IOHIDValueRef.

IOHIDValueGetElement

Returns the element value associated with this IOHIDValueRef.

IOHIDValueGetIntegerValue

Returns an integer representaion of the value contained in this IOHIDValueRef.

IOHIDValueGetLength

Returns the size, in bytes, of the value contained in this IOHIDValueRef.

IOHIDValueGetScaledValue

Returns an scaled representaion of the value contained in this IOHIDValueRef based on the scale type.

IOHIDValueGetTimeStamp

Returns the timestamp value contained in this IOHIDValueRef.

IOHIDValueGetTypeID

Returns the type identifier of all IOHIDValue instances.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software