Supplies a user function to handle SQL Server messages for a specific DBPROCESS connection.
DBMSGHANDLE_PROC dbprocmsghandle (
PDBHANDLE pdbhandle,
DBMSGHANDLE_PROC message_handler)
where
If pdbhandle is a DBPROCESS, a pointer to the previously installed connection message handler is returned. This can be NULL.
If pdbhandle is a LOGINREC, a pointer to the newly installed connection message handler is returned, or NULL if this function fails.
This function is very similar to the dbmsghandle function. While dbmsghandle installs a message handler global to the entire DB-Library application, dbprocmsghandle installs a message handler for a specific DBPROCESS connection. You define the connection message handler function in exactly the same way as the application message handler function.
When DB-Library receives a message from SQL Server using a connection that has a connection message handler (installed using dbprocmsghandle), only the connection message handler is called. The application message handler is not called. Because a connection message handler is associated with a connection and is not global to the entire DB-Library application, the connection message handler code does not need to protect against reentrancy by DB-Library.
Note that this function is not supported for MS-DOS.