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

  Switch on low bandwidth view
IInitializeSpy Interface

Performs initialization or cleanup when entering or exiting a COM apartment.

When To Implement

Implement this interface when you want to define code to be called whenever CoInitializeEx (or CoInitialize) or CoUninitialize is called.

When To Use

Use this interface when you need to do initialization or cleanup when entering or exiting a COM apartment.

Use CoRegisterInitializeSpy to register the particular implementation of the IInitializeSpy interface to be used.

Methods

The IInitializeSpy interface inherits the methods of the IUnknown interface.

In addition, IInitializeSpy defines the following methods.

MethodDescription

PreInitialize

Performs initialization steps required before calling the CoInitializeEx function.

PostInitialize

Performs initialization steps required after calling the CoInitializeEx function.

PreUninitialize

Performs cleanup steps required before calling the CoUninitialize function.

PostUninitialize

Performs cleanup steps required after calling the CoUninitialize function.

 

Requirements

Minimum supported clientWindows XP with SP1
Minimum supported serverWindows Server 2003
HeaderObjIdl.h
IDLObjIdl.idl
IIDIID_IInitializeSpy is defined as 00000034-0000-0000-C000-000000000046

See Also

CoRegisterInitializeSpy

Send comments about this topic to Microsoft

Build date: 7/9/2009

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