NMX_RegisterCallback_1

<< Click to Display Table of Contents >>

Navigation:  NmxDLL Reference Manual > API (programming interface) > Notifications >

NMX_RegisterCallback_1

This function is used to register a notification callback function at the DLL.

 

Definition


NMX_STATUS NMX_RegisterCallback_1(

 NMX_PHANDLE pHandle,

 unsigned long ulNotification,

 NMX_NOTIFICATION_CALLBACK* pCbFunction,

 void* pvContext);

 

Parameter


pHandle

Connection Handle.

ulNotification

Notification type, e.g. NMXNOTIFY_NEW_STATIC32.

pCbFunction

Pointer to callback function.

pvContext

A caller provided context pointer which is passed unchanged to the callback function.

 

Typical function call (C example)


RegisterCallback_1(pHandle, NMXNOTIFY_NEW_STATIC32, &Callback_NewStatic32, (void*)&ulCallbackContext);

 

Comments


If pCbFunction is NULL, a registered callback will be cleared.

 

Callback function

This function is the prototype for a callback notification.

Definition


void NMX_CALLCONV NMX_NOTIFICATION_CALLBACK(IN void* pvContext);

 

Parameter


pvContext

This parameter is the same which was passed to the function NMX_RegisterCallback_1. The application can store a context information in this pointer.

 

Comments


This function is called in a different thread context. The application must handle the synchronisation.