Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: More Macintosh Toolbox /
Chapter 6 - Component Manager / Component Manager Reference
Routines for Components


Working With Component Reference Constants

The Component Manager provides routines that manage access to the reference constants that are associated with components. There is one reference constant for
each component, regardless of the number of connections to that component. When your component is registered, the Component Manager sets this reference constant to 0.

The reference constant is a 4-byte value that your component can use in any way you decide. For example, you might use the reference constant to store the address of a data structure that is shared by all connections maintained by your component. You should allocate shared structures in the system heap. Your component should deallocate the structure when its last connection is closed or when it is unregistered.

Use the SetComponentRefcon procedure to set the value of the reference constant for your component. Use the GetComponentRefcon function to retrieve the value of the reference constant.


Subtopics
SetComponentRefcon
GetComponentRefcon

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996