The register user message hook is called whenever a user message or data type is registered. The following code shows the syntax for a register user message hook function:
BOOL EXPENTRY RegisterUserHook(HAB hab, ULONG cUshort, PULONG/PUSHORT arRMP, PBOOL fRegistered);
The hab parameter is the application anchor block.
The cUshort parameter is the number of data type codes. For data types, this parameter is the number of data type codes in the arRMP parameter. This value must not be less than one.
For messages, this parameter is set to 0.
The arRMP parameter is an array of data type codes. For data types, this parameter is an array of data type codes. For messages, this parameter is set to NULL.
Valid data types are the system-defined data types and their pointer equivalents, application-defined data types and their pointer equivalents, and control data types. Note that not all of the data types that occur in the CPI an be specified in this function.
A control data type is followed by one or more entries in the arRMP array that are interpreted in a special way. Control data types allow arrays, offsets, and lengths to be defined. See RegisterUserHook for a full description of the values for the arRMP parameter.
The fRegistered parameter is the flag indicating that a message or data type was registered. If TRUE, the message or data type was registered. If FALSE, the message or data type was not registered.
The function returns either TRUE (success) or FALSE (an error occurred).