Carbon


PMCreateSession

Header: PMCore.h Carbon status: Supported

Initializes a PMPrintSession object and creates a context for printing operations.

OSStatus PMCreateSession (
    PMPrintSession *printSession
);
Parameter descriptions
printSession

A PMPrintSession object.

function result

A result code. A result code. See “Result Codes”.

DISCUSSION

The PMCreateSession function creates a context for printing operations. This context is called a printing session.

On Mac OS X, you can use PMCreateSession to implement multithreaded printing, and you can create multiple sessions within a single-threaded application. On Mac OS 8 and 9, an application is limited to a single printing session using one thread. An error is returned if you try to nest calls to PMCreateSession within a single thread, or to create multiple sessions with separate threads.

Note that each printing session is limited to one dialog box at a time. Each printing session can have its own dialog box, and settings changed in one dialog box are independent of settings in any other dialog box. Because certain calls will block, it is not possible to bring up either the Page Setup or Print dialog boxes from different sessions at the same time in a single thread.

SPECIAL CONSIDERATIONS

You must call PMCreateSession before any other Carbon Printing Manager function.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.1 and later when CarbonLib 1.1 or later is present.

CARBON NOTES

PMCreateSession is equivalent to the Classic Printing Manager function PrOpen.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)