CFPlugInFactoryFunction

Header: CFPlugIn.h Carbon status: Under Evaluation

Defines a pointer to a plug-in's factory callback function. Callback function that a plug-in author must implement. This function creates an instance of a type.

typedef void(*CFPlugInFactoryFunction) (
    CFAllocatorRef allocator, 
    CFStringRef typeName
);

You would declare your function like this if you were to name it MyCallback:

void *MyCallback (
    CFAllocatorRef allocator, 
    CFStringRef typeName
);
Parameter descriptions
allocator

The allocator to use. Pass null or kCFAllocatorDefault to use the default allocator.

typeName

The UUID of the type you wish to instantiate.

DISCUSSION

The plug-in author's implementation of this function is registered with CFPlugIn either statically in the plug-in's Info.plist file, or dynamically. This function is executed as a result of a call to CFPlugInInstanceCreate by the plug-in host.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)