CoRevokeInitializeSpy function (objbase.h)

Revokes a registered implementation of the IInitializeSpy interface.


HRESULT CoRevokeInitializeSpy(
  [in] ULARGE_INTEGER uliCookie


[in] uliCookie

A ULARGE_INTEGER cookie identifying the registration.

Return value

This function can return the standard return value E_INVALIDARG, as well as S_OK to indicate success.


CoRevokeInitializeSpy can only revoke cookies issued by previous calls to CoRegisterInitializeSpy that were executed on the current thread. Using a cookie from another thread, or one that corresponds to an already revoked registration, will return E_INVALIDARG.

It is unpredictable whether a call to CoRevokeInitializeSpy from within an IInitializeSpy method call will have an effect during the current top-level (non-nested) call to CoInitializeEx or CoUninitialize. The revocation will always have an effect after the current top-level call to CoInitializeEx or CoUninitialize returns.


Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header objbase.h
Library Ole32.lib
DLL Ole32.dll

See also