This function also allows the caller to deregister from receiving the above notifications. When deregistering, if pfn is non-NULL, the callback associated with pfn and pUser is deregistered. If pfn is NULL, a callback associated with pUser is deregistered.
The user-specified callback should always be explicitly deregistered by the client; releasing the INetMgr object does not implicitly deregisters the callback.
int INETMGR_OnEvent ( INetMgr * pINetMgr, PFNNETMGREVENT pfn, void * pUser, boolean bRegister )
- SUCCESS: if registered
ENOMEMORY: if allocation failure
EALREADY: if a callback is already registered. If pfn is non-NULL, a
callback associated with pfn and pUser is already registered. If
pfn is NULL, a callback associated with pUser is already registered.
Other error codes are also possible