The IInitializeSpy interface is used to do initialization or cleanup when entering or exiting a COM apartment.
Implement this interface when you want to define code to be called whenever CoInitializeEx (or CoInitialize) or CoUninitialize is called.
Use this interface when you need to do initialization or cleanup when entering or exiting a COM apartment.
PreInitialize
Called before a call to CoInitializeEx is executed.
PostInitialize
Called after a call to CoInitializeEx has executed.
PreUninitialize
Called before a call to CoUninitialize is executed.
PostUninitialize
Called after a call to CoUninitialize has executed.
Use CoRegisterInitializeSpy to register the particular implementation of the IInitializeSpy interface to be used.
For an explanation of the requirement values, see Requirements (COM).
Windows NT/2000/XP: Requires Windows XP Service Pack 1 or Windows Server 2003 or later.
Windows 95/98: Unsupported.
Header: Declared in objidl.h.