OpenEdition
To initiate the reading of data from an edition (for a subscriber), use the OpenEdition function.
FUNCTION OpenEdition (subscriberSectionH: SectionHandle;
VAR refNum: EditionRefNum): OSErr;
subscriberSectionH
- A handle to the section record for a given section.
refNum
- The
OpenEdition function returns the reference number for the edition in this parameter.
DESCRIPTION
The OpenEdition function opens an edition for reading and returns a reference number that your application can use to refer to this edition in other Edition Manager routines. Multiple subscribers can each call the OpenEdition function simultaneously (each call returns a different reference number) and read data from a single edition. If a publisher (located on a different machine) is writing to an edition when you use the OpenEdition function, you receive an flLckedErr result code.
RESULT CODES
| noErr | 0 | No error |
| fnfErr | -43 | File not found |
| flLckedErr | -45 | Publisher writing to an edition |
| permErr | -54 | Not a subscriber |
| editionMgrInitErr | -450 | Manager not initialized |
SEE ALSO
For an example of the use of OpenEdition, see Listing 2-7 on page 2-42.