Folks,

In the code below, from

http://developer.apple.com/documentation/Carbon/Conceptual/ ImageCaptureServicesProgrammingGuide/ 03HowtoWriteanImageCaptureApplication/chapter_3_section_1.html#// apple_ref/doc/uid/TP40005196-CH4-SW1


In the calls CFArrayCreate and ICARegisterForEventNotification, the code uses a variable called "amp". What is "amp"? As it sits, the snippet does not compile, stumbling as I have, on "amp".

Thanks,

Gary





/* Sample code snippet to illustrate the use of ICARegisterForEventNotification() */

OSErr registerForNotifications()

{

    OSErr                              err = noErr;

    ICARegisterForEventNotificationPB  pb = {};

    CFStringRef                        notificationsOfInterest[]  = {

k ICANotificationTypeDeviceRemoved,

k ICANotificationTypeDeviceInfoChanged,

k ICANotificationTypeDeviceWasReset,

k ICANotificationTypeCaptureComplete,

k ICANotificationTypeTransactionCanceled,

k ICANotificationTypeStoreAdded,

k ICANotificationTypeStoreRemoved,

k ICANotificationTypeStoreFull,

k ICANotificationTypeStoreInfoChanged,

k ICANotificationTypeObjectAdded,

k ICANotificationTypeObjectRemoved,

k ICANotificationTypeObjectInfoChanged

                                                                    };

CFMutableArrayRef array = CFArrayCreate( kCFAllocatorDefault, (const void**)&notificationsOfInterest, 12, &kCFTypeArrayCallBacks );

    pb.header.refcon    = (long)self;

    pb.objectOfInterest = <#ICAObject object#>

/* valid values are 0, device list object, or device object. 0 gets notifications related to any object. */

    pb.eventsOfInterest = (CFArrayRef)array;

    pb.notificationProc = notificationCallback;

    pb.options          = NULL;

err = ICARegisterForEventNotification( &amp;pb, registerForEventNotificationCallback );

    CFRelease( array );

    return err;

}
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to