Skip to main content

MappGetHookInfo

Get information about a hooked event.

Syntax

AIL_INT MappGetHookInfo(
AIL_ID ContextAppId, //in
AIL_ID EventId, //in
AIL_INT64 InfoType, //in
void * UserVarPtr //out
)

Description

This function retrieves information about the event that caused the hook-handler function to be called. This function should only be called within the scope of an application hook-handler function call (see MappHookFunction).

Parameters

ContextAppId (in, AIL_ID)

Specifies the identifier of the Aurora Imaging Library application context to use.

For specifying the application context

ValueDescription
M_DEFAULTSpecifies the application context of the current process.
Application context identifierSpecifies the identifier of an application context.

Typically, specifying an application context identifier is used to specify a remote application on a remote computer. However, it can be used for a remote application on the local computer, or the current process. When you explicitly specify the identifier of the current process, it is equivalent to specifying M_DEFAULT. |

EventId (in, AIL_ID)

Specifies the application event identifier received by the hook-handler function. See MappHookFunction for more information.

InfoType (in, AIL_INT64)

Specifies the type of information to get.

UserVarPtr *(out, void)

Specifies the address in which to write the requested information. Note that, when getting parameter values (MappGetHookInfo with M_PARAM_VALUE), the UserVarPtr parameter should be of the same data type as value of the selected parameter.

Parameter Associations

For retrieving information about an

If the hook-handler function was called due to an M_ERROR_CURRENT, M_ERROR_FATAL, or M_CALLEE_ERROR_CURRENTevent type, the InfoType parameter can be set to one of the values below.


M_CURRENT

Retrieves the error code associated with the error event that caused the hook-handler function to be called.


M_CURRENT_SUB_1

Retrieves the first error subcode associated with the error event that caused the hook-handler function to be called.


M_CURRENT_SUB_2

Retrieves the second error subcode associated with the error event that caused the hook-handler function to be called.


M_CURRENT_SUB_3

Retrieves the third error subcode associated with the error event that caused the hook-handler function to be called.


M_CURRENT_SUB_NB

Retrieves the number of error subcodes associated with the error event that caused the hook-handler function to be called.

For retrieving information about an

If the hook-handler function was called due to an M_ERROR_CURRENT, M_ERROR_FATAL, M_TRACE_START, or M_TRACE_END event type, the InfoType parameter can be set to the value below.


M_CURRENT_OPCODE

Retrieves the function opcode associated with the error event that caused the hook-handler function to be called (for M_ERROR_CURRENT, M_ERROR_FATAL, M_CALLEE_ERROR_CURRENT), just started (for M_TRACE_START), or just ended (for M_TRACE_END). > Note: To learn which function corresponds to each opcode, refer to ailfunctioncode.h.

Combination Constants — For getting the associated message instead of the numeric code

Optional.

Usage: You can add one of the following values to the above-mentioned values to get the associated message instead of the numeric code.

M_MESSAGE

Returns the error message instead of the error opcode, or the function name instead of the function opcode. If the message is truncated, use M_MESSAGE_EXTENDED for the complete message.

M_MESSAGE_EXTENDED

Returns the error message instead of the error opcode, or the function name instead of the function opcode.

Combination Constants — For getting the message size

Optional.

Usage: You can add one of the following values to the above-mentioned values to get the message's length.

M_STRING_SIZE

Retrieves the length of the string, including the terminating null character ("\0").

For retrieving information about an

If the hook-handler function was called due to an M_OBJECT_PUBLISH_DAIL event type, the InfoType parameter can be set to the value below.


M_OBJECT_ID

Retrieves the identifier of the object whose publication state was modified.

For retrieving information about an

If the hook-handler function was called due to anM_WEB_CLIENT_CONNECTEDorM_WEB_CLIENT_DISCONNECTEDevent type, the InfoType parameter can be set to the value below.


M_WEB_CLIENT_INDEX

Retrieves the index that uniquely identifies the instance of your Aurora Imaging Web Library client application that connected or disconnected. This index refers to the same instance of the client application, as long as that instance is connected. If the instance disconnects and then reconnects, it is assigned a new index. > Note: Indices of clients are not zero- or one-based, nor are they guaranteed to be sequential.

For retrieving information about an

If the hook-handler function was called due to an M_TRACE_START or M_TRACE_END event type, the InfoType parameter can be set to one of the values below.


M_PARAM_NB

Retrieves the number of parameters associated with the function called.


M_PARAM_SIZE

Retrieves the size, in bytes, of the specified parameter. For an array parameter, the size is: _Number of items in the array_ X _Size of the item._


M_PARAM_TYPE_INFO

Retrieves the data type of the specified parameter of the function called.

ValueDescription
M_PARAM_TYPE_AIL_DOUBLESpecifies that the parameter is of type AIL_DOUBLE.
M_PARAM_TYPE_AIL_FLOATSpecifies that the parameter is of type AIL_FLOAT.
M_PARAM_TYPE_AIL_IDSpecifies that the parameter is of type AIL_ID.
M_PARAM_TYPE_AIL_INTSpecifies that the parameter is of type AIL_INT.
M_PARAM_TYPE_AIL_INT8Specifies that the parameter is of type AIL_INT8.
M_PARAM_TYPE_AIL_INT16Specifies that the parameter is of type AIL_INT16.
M_PARAM_TYPE_AIL_INT32Specifies that the parameter is of type AIL_INT32.
M_PARAM_TYPE_AIL_INT64Specifies that the parameter is of type AIL_INT64.
M_PARAM_TYPE_AIL_TEXTSpecifies that the parameter is of type AIL_TEXT. This implies that the character encoding scheme of the AIL_TEXT parameter is the scheme you are currently using.
M_PARAM_TYPE_AIL_TEXT_ASCIISpecifies that the parameter is of type AIL_TEXT_ASCII. This only appears when you are currently using a character encoding scheme other than ASCII, and the parameter you are inquiring is specifically in ASCII.
M_PARAM_TYPE_AIL_TEXT_UNICODESpecifies that the parameter is of type AIL_TEXT_UNICODE. This only appears when you are currently using a character encoding scheme other than unicode, and the parameter you are inquiring is specifically in unicode.
M_PARAM_TYPE_AIL_UINTSpecifies that the parameter is of type AIL_UINT.
M_PARAM_TYPE_AIL_UINT8Specifies that the parameter is of type AIL_UINT8.
M_PARAM_TYPE_AIL_UINT16Specifies that the parameter is of type AIL_UINT16.
M_PARAM_TYPE_AIL_UINT32Specifies that the parameter is of type AIL_UINT32.
M_PARAM_TYPE_AIL_UINT64Specifies that the parameter is of type AIL_UINT64.
M_PARAM_TYPE_ARRAY_AIL_DOUBLESpecifies that the parameter is an array of type AIL_DOUBLE. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_ARRAY_AIL_FLOATSpecifies that the parameter is an array of type AIL_FLOAT. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_ARRAY_AIL_IDSpecifies that the parameter is an array of type AIL_ID. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_ARRAY_AIL_INTSpecifies that the parameter is an array of type AIL_INT. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_ARRAY_AIL_INT8Specifies that the parameter is an array of type AIL_INT8. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_ARRAY_AIL_INT16Specifies that the parameter is an array of type AIL_INT16. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_ARRAY_AIL_INT32Specifies that the parameter is an array of type AIL_INT32. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_ARRAY_AIL_INT64Specifies that the parameter is an array of type AIL_INT64. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_ARRAY_AIL_UINTSpecifies that the parameter is an array of type AIL_UINT. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_ARRAY_AIL_UINT8Specifies that the parameter is an array of type AIL_UINT8. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_ARRAY_AIL_UINT16Specifies that the parameter is an array of type AIL_UINT16. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_ARRAY_AIL_UINT32Specifies that the parameter is an array of type AIL_UINT32. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_ARRAY_AIL_UINT64Specifies that the parameter is an array of type AIL_UINT64. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_CONST_AIL_TEXTSpecifies that the parameter is a constant of type AIL_TEXT. This implies that the character encoding scheme of the AIL_TEXT parameter is the scheme you are currently using.
M_PARAM_TYPE_CONST_AIL_TEXT_ASCIISpecifies that the parameter is a constant of type AIL_TEXT_ASCII. This only appears when you are currently using a character encoding scheme other than ASCII, and the parameter you are inquiring is specifically in ASCII.
M_PARAM_TYPE_CONST_AIL_TEXT_UNICODESpecifies that the parameter is a constant of type AIL_TEXT_UNICODE. This only appears when you are currently using a character encoding scheme other than unicode, and the parameter you are inquiring is specifically in unicode.
M_PARAM_TYPE_CONST_ARRAY_AIL_DOUBLESpecifies that the parameter is a constant array of type AIL_DOUBLE. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_CONST_ARRAY_AIL_FLOATSpecifies that the parameter is a constant array of type AIL_FLOAT. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_CONST_ARRAY_AIL_IDSpecifies that the parameter is a constant array of type AIL_ID. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_CONST_ARRAY_AIL_INTSpecifies that the parameter is a constant array of type AIL_INT. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_CONST_ARRAY_AIL_INT8Specifies that the parameter is a constant array of type AIL_INT8. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_CONST_ARRAY_AIL_INT16Specifies that the parameter is a constant array of type AIL_INT16. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_CONST_ARRAY_AIL_INT32Specifies that the parameter is a constant array of type AIL_INT32. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_CONST_ARRAY_AIL_INT64Specifies that the parameter is a constant array of type AIL_INT64. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_CONST_ARRAY_AIL_UINTSpecifies that the parameter is a constant array of type AIL_UINT. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_CONST_ARRAY_AIL_UINT8Specifies that the parameter is a constant array of type AIL_UINT8. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_CONST_ARRAY_AIL_UINT16Specifies that the parameter is a constant array of type AIL_UINT16. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_CONST_ARRAY_AIL_UINT32Specifies that the parameter is a constant array of type AIL_UINT32. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_CONST_ARRAY_AIL_UINT64Specifies that the parameter is a constant array of type AIL_UINT64. Note that the pointer to the data stored in the array is unavailable after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_CONST_DATA_PTRSpecifies that the parameter is a constant data pointer. Note that the pointer to the data is invalid after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_DATA_PTRSpecifies that the parameter is a data pointer. Note that the pointer to the data is invalid after exiting the hook-handler function. For future use, copy and save the data.
M_PARAM_TYPE_FILENAMESpecifies that the parameter is of type FILENAME. This implies that the character encoding scheme of the FILENAME parameter is the scheme you are currently using.
M_PARAM_TYPE_FILENAME_ASCIISpecifies that the parameter is of type FILENAME_ASCII. This only appears when you are currently using a character encoding scheme other than ASCII, and the parameter you are inquiring is specifically in ASCII.
M_PARAM_TYPE_FILENAME_UNICODESpecifies that the parameter is of type FILENAME_UNICODE. This only appears when you are currently using a character encoding scheme other than unicode, and the parameter you are inquiring is specifically in unicode.

M_PARAM_VALUE

Retrieves the value of the specified parameter of the function called.

Combination Constants — For specifying the parameter

Essential.

Usage: You must add one of the following values to the above-mentioned values to determine the number of the parameter for which to receive the information.

ValueDescription
1 <= Value <= 16Specifies the number of the parameter for which to retrieve the information. This value must be a positive integer, and should not exceed the number of parameters associated with the function call (M_PARAM_NB).

Return Value

Type: AIL_INT

The returned value is M_NULL if successful. If the operation fails, a non-null (!M_NULL) value is returned.

Copyright © 2026 Zebra Technologies.