The DisableEvents method disables the event notification
mechanism, preventing subsequent event notification messages from
being posted to the application's message queue.
This method has been deprecated and may be unavailable in future
releases. It was designed for use in legacy single-threaded applications
and requires the application to have a message pump to process event
messages. It should not be used with applications which are designed
to execute as a service or those which do not have a graphical user
interface.
Parameters
None.
Return Value
If the method succeeds, the return value is zero. If the method
fails, the return value is HTTP_ERROR. To get extended error
information, call GetLastError.
Remarks
The DisableEvents method is used to disable event message
posting for the specified client session. Although this will
immediately prevent any new events from being generated, it is
possible that messages could be waiting in the message queue.
Therefore, an application must be prepared to handle client event
messages after this method has been called.
This method is automatically called if the client has event
notification enabled, and the Disconnect method is called. The
same issues regarding outstanding event messages also applies in this
situation, requiring that the application handle event messages that
may reference a client handle that is no longer valid.
Requirements
Minimum Desktop Platform: Windows 7 (Service Pack 1)
Minimum Server Platform: Windows Server 2008 R2 (Service Pack 1)
Header File: cstools10.h
Import Library: cshtpv10.lib
See Also
EnableEvents,
RegisterEvent
|