Called by the framework to notify your component of component related events.
Syntax
Parameters
dwNotificationType
Type:
unsigned long
The type of notification event.
Notification Type | Remarks |
---|---|
COMPONENT_NOTIFY_NEWCOMPONENT | A new component has been registered with the framework |
COMPONENT_NOTIFY_REMOVECOMPONENT | Not used |
COMPONENT_NOTIFY_NEWINTERFACE | A new interface was registered with the framework. This message is where you typically track of interfaces you depend on and return TRUE from QueryInitInterfaces if all required interfaces have been notified |
COMPONENT_NOTIFY_STARTED | A component has had it's Start() function called |
COMPONENT_NOTIFY_STOPPED | A component has had it's Stop() function called |
COMPONENT_NOTIFY_QUERYSHUTDOWN | The host framework is notifying you of a shutdown request. You can abort the shutdown through the return code. |
COMPONENT_NOTIFY_SYSTEMUP | The framework is up and running, all component initialisation is complete |
COMPONENT_NOTIFY_PREDISCONNECT | A client (WinGate Management Console) has requested a disconnect from the WinGate Engine |
COMPONENT_NOTIFY_STOPPING | All components are about to be stopped |
COMPONENT_NOTIFY_SHUTDOWN_STARTING | The WinGate engine is about to stop |
pEntry
Type:
ComponentEntry *
The ComponentEntry object that this notification is for. The reason this is passed through is that your Notify function might be used for multiple components. pEntry allows you to determine exactly which component this is for. In the most typical situations a module only had one component and therefore there is no ambiguity so this parameter can be ignored.
pData
Type:
void *
Context data relating to the notification type being processed.
Notification Type | pData type |
---|---|
COMPONENT_NOTIFY_NEWCOMPONENT | A pointer to the ComponentEntry object of the new component |
COMPONENT_NOTIFY_REMOVECOMPONENT | Not used |
COMPONENT_NOTIFY_NEWINTERFACE | Pointer to the ComponentInterfaceEntry object that was just registered. |
COMPONENT_NOTIFY_STARTED | A pointer to the ComponentEntry object of the started component |
COMPONENT_NOTIFY_STOPPED | A pointer to the ComponentEntry object of the stopped component |
COMPONENT_NOTIFY_QUERYSHUTDOWN | NULL |
COMPONENT_NOTIFY_SYSTEMUP | NULL |
COMPONENT_NOTIFY_PREDISCONNECT | NULL |
COMPONENT_NOTIFY_STOPPING | NULL |
Return Value
Type: int
For COMPONENT_NOTIFY_QUERYSHUTDOWN notification events you can return COMPONENT_NOTIFYRET_DENYSHUTDOWN to halt the shutdown or 0 to allow the shutdown.
For all other notification events the return type has no meaning.
Remarks
None
Examples
See Also