Function

CFFileDescriptorCreate

Creates a new CFFileDescriptor.

Declaration

CFFileDescriptorRef CFFileDescriptorCreate(CFAllocatorRef allocator, CFFileDescriptorNativeDescriptor fd, Boolean closeOnInvalidate, CFFileDescriptorCallBack callout, const CFFileDescriptorContext *context);

Parameters

allocator

The allocator to use to allocate memory for the new file descriptor object. Pass NULL or kCFAllocatorDefault to use the current default allocator.

fd

The file descriptor for the new CFFileDescriptor.

closeOnInvalidate

true if the new CFFileDescriptor should close fd when it is invalidated, otherwise false.

callout

The CFFileDescriptorCallBack for the new CFFileDescriptor.

context

Contextual information for the new CFFileDescriptor.

Return Value

A new CFFileDescriptor or NULL if there was a problem creating the object. Ownership follows the The Create Rule.

See Also