[Contents] [Index] [Help] [Browse <] [Browse >]


amarquee.library/QSetMessageAccessOp           amarquee.library/QSetMessageAccessOp

   NAME
    QSetMessageAccessOp - Specify which other clients may send
                          you messages with QMessageOp.

   SYNOPSIS
    #include 

    LONG QSetMessageAccessOp(struct QSession * session, char * newAccess, LONG maxBytes)

   FUNCTION
    This function allows you to specify which other clients may
    send you data directly using the QMessageOp function.  
    
   NOTE
    When you first connect, messaging access is turned off, and no
    other client may send you messages.  (This ensures that you
    do not receive QMessages that you were not expecting!)
    
   INPUTS
    session   - The session you wish to send the message access op to.
    newAccess - The new access pattern to use, or NULL if you wish to
                allow no messages to be sent to your program.
    maxBytes  - The maximum size that any data buffer sent to your
                client may be.  Messages longer that "maxBytes" bytes
                long will be truncated before they are sent to you.
                If you specify maxBytes as -1, no restriction will be
                placed on message length.
                
   RESULTS
    Returns the assigned ID number of the access operation, or 0
    to indicate failure.  This function will fail and return 0 if
    the "newAccess" arg is not in the form "/foo/bar".

   EXAMPLE
    LONG transID;
    
    /* Let programs named ExampleProgram send us messages */
    if (transID = QMessageSetAccessOp(session, "/#?/ExampleProgram"))
       printf("MessageSetAccess op succeeded, was given id #%li\n",transID);
    else 
       printf("MessageSetAccess op failed.  (no memory?)\n");

   AREXX EXAMPLE
    transID = QSetMessageAccessOp(session, '#?/ExampleProgram')
    if (transID = 0) then say "Oops, transaction failed."

   SEE ALSO
    QGo, QMessage
    

Converted on 24 Mar 2002 with RexxDoesAmigaGuide2HTML 2.1e(private) by Michael Ranner.