Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
This callback function is an application-defined function. It must be implemented by a device that supplies a pointer to the UpnpAddDevice function. The device hosting service calls this function when network messages are received. The PUPNPCALLBACK name for this function is a placeholder for the function name defined by the application.
typedef DWORD (*PUPNPCALLBACK) (UPNPCB_IDcallbackId,PVOID pvUserContext,PVOIDpvSvcParam);
Parameters
- callbackId
Callback identifier. Can contain one of the following values.UPNPCB_ID pvSvcParam When to call UPNPCB_INIT Null Before first action or subscribe request UPNPCB_SUBSCRIBING pszServiceId Subscribe request UPNPCB_UNSUBSCRIBING pszServiceId Unsubscribe request UPNPCB_CONTROL PUPNPSERVICECONTROL Control action UPNPCB_SHUTDOWN Null When the UpnpRemoveDevice function is called - pvUserContext
Application context, this value is obtained from the UPNPDEVICEINFO structure. - pvSvcParam
Service parameter. See above for a list of possible values.
Return Values
The callback should return TRUE for success and FALSE to indicate a failure.
Remarks
The callback function may ignore notifications that it is not interested in and return TRUE. It should handle at least the UPNCB_CONTROL notification as this notification specifies how control actions are processed.
The following functions should only be called inside the UPNPCALLBACK function when the UPNPCB_ID is UPNPCB_CONTROL:
Requirements
OS Versions: Windows CE .NET 4.0 and later.
Header: Upnpdevapi.h.
Link Library: Upnpcapi.lib.
See Also
UpnpRemoveDevice | UPNPDEVICEINFO | UPnP C Device Host Functions
Send Feedback on this topic to the authors