Specifications

CHAPTER 4
Software Support
Messaging Code Samples 81
Messaging Code Samples 4
This section summarizes the code associated with messages being passed from the
Macintosh to the PC system.
Registering Owner Type 4
The following parameter block is used to define the owner of the message:
pbp.csCode = rsRegisterMessage = 803
// owner == Application creator
pbp.csPtr = (void*)owner;
// cmdCount == Whatever is needed
pbp.csData = cmdCount;
err - PBControl((ParmBlkPtr)&pbp);
cmdBase = (int)pbp.csPtr;
PC event detection—notification procedure or event notification
rsSetNotificationProc = 900 Noti-
fication
Sets address of the notification
procedure
Messaging
rsRegisterMessage = 803 Control Registers message type
rsInstallMsgHandler = 801 Control Installs message handler
rsSendMessage = 800 Control Sends a message
rsRemoveMsgHandler = 802 Control Removes message handler
msgNoError = 0 Result No errors detected, message
completed
msgOverrun = -1 Result More data was available
msgUnderrun = -2 Result Less data was available
msgTimeout = -3 Result A timeout error has occurred
Mac MsgBlk PC MsgBlk Result The Macintosh message block is
not the same size as the PC
message block
Table 4-4 Summary of constants (continued)
Call and constant
Code/
call type Description