Click to Rate and Give Feedback
MSDN
MSDN Library
COM
COM Fundamentals
Reference
Interfaces
IInitializeSpy
COM
IInitializeSpy

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.

IInitializeSpy methods Description

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.

Send comments about this topic to Microsoft.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker