Exchanging Message Blocks Between Programs
Exchanging Message Blocks Between Programs
Using the Event Manager or Apple Event Manager to send events should
meet the needs of most applications for program-to-program communication.
However, for low-level control or to get services not provided by the
Event Manager or Apple Event Manager, you can use the PPC Toolbox.
The PPC Toolbox lets you send larger amounts of data to other applications
located on the same computer or across a network. The
PPC Toolbox can also be used by pieces of code that are not event- driven.
The PPC Toolbox is usually called by the Operating System; device drivers,
desk accessories, or other code modules can also use it.
Using the PPC Toolbox to send data between programs requires that both
your program and the program you're communicating with are open at the
same time. To initiate communication, one program opens a port and requests a
session with another program. The target program must also open a port and
accept the request. Once a session is established, the two programs can read and
write low-level message blocks.
See the PPC Toolbox for information on reading and writing low-level
message blocks between programs.
Remote Data Access
Using the Data Access Manager, your application can communicate with
databases or other data sources running on a Macintosh computer or on a
remote host computer. For example, your application can use high-level
routines to open a document containing commands to be sent to a remote data
server; initiate communication with the remote data server; send the
commands to the server; and (after the server executes the commands)
retrieve the requested data from the server. You can also use the
Data Access Manager to send data to a remote database or other data source.
If your application knows how to create commands for a remote data server,
then your application can use low-level routines to send these commands and
data directly to the data server.
The Figure below shows how a user in San Francisco might use a spreadsheet
application to request data from a company database in New York. The
spreadsheet application can use the Data Access Manager to request the data
from the database. The database application in New York sends back the
requested data, and the spreadsheet application can use this data to generate a
graph of the information.
Requesting data from a remote database
See the Data Access Manager for information on sending and retrieving
information from a remote database or other data source.