UserLogEntry Allows a user specified message to be written to the transaction logs. Short Name TRANUSR() Declaration The function declaration is as follows: LONG UserLogEntry(LONG filno, LONG poshw, LONG poslw, LONG offset, Description UserLogEntry() returns the low order word of the transaction number associated with the log entry. A return value of zero indicates an error and uerr_cod contains the error number. The high order word of the transaction number is returned by a call to ctGETHGH() after a successful call to UserLogEntry(). filno specifies a user file number or -1 if no file number. poshw, poslw, and offset specify three 4-byte integers to be used as desired. By convention, poshw and poslw are the high and low order words of a file position, and offset specifies the number of bytes this file position is from the beginning of a logical record. However there is no restriction on how the user interprets these three words. attribute specifies a 4-byte integer stored in the tranatr word of the TRANDSC structure. It is intended to permit the user to specify the type of user log entry. There are two restrictions:
buffer points to an optional variable length portion of the log entry. Its contents are completely arbitrary. bufsiz is the length of buffer. It should be zero if buffer is NULL. It is not permitted to exceed a configurable limit. If bufsiz exceeds the limit, a PBAD_ERR (749) occurs. The limit prevents a malicious program from "swamping" the log. The server configuration keyword MAX_USER_LOG_ENTRY_BYTES < maximum number of bytes in variable region> overrides the default limit of 16KB. |
|||