Functions
Functions
Functions

The following functions are provided by COM.

FunctionDescription
BindMonikerLocates an object by means of its moniker, activates the object if it is inactive, and retrieves a pointer to the specified interface on that object.
CLSIDFromProgIDLooks up a CLSID in the registry, given a ProgID.
CLSIDFromProgIDExTriggers automatic installation if the COMClassStore policy is enabled.
CLSIDFromStringConverts a string generated by the StringFromCLSID function back into the original CLSID.
CoAddRefServerProcessIncrements a global per-process reference count.
CoAllowSetForegroundWindowEnables the COM server process called to take focus away from the client application by using the IForegroundTransfer interface.
CoCancelCallRequests cancellation of an outbound DCOM method call pending on a specified thread.
CoCopyProxyMakes a private copy of the specified proxy.
CoCreateFreeThreadedMarshalerCreates an aggregatable object capable of context-dependent marshaling.
CoCreateGuidCreates a GUID, a unique 128-bit integer used for CLSIDs and interface identifiers.
CoCreateInstanceCreates a single uninitialized object of the class associated with a specified CLSID.
CoCreateInstanceExCreates an instance of a specific class on a specific computer.
CoDisableCallCancellationUndoes the action of a call to CoEnableCallCancellation.
CoDisconnectContextDisconnects all proxy connections that are being maintained on behalf of all interface pointers that point to objects in the current context.
CoDisconnectObjectDisconnects all remote process connections being maintained on behalf of all the interface pointers that point to a specified object.
CoDosDateTimeToFileTimeConverts the MS-DOS representation of the time and date to a FILETIME structure used by Windows.
CoEnableCallCancellationEnables cancellation of synchronous calls on the calling thread.
CoFileTimeNowReturns the current time as a FILETIME structure.
CoFileTimeToDosDateTimeConverts a FILETIME into MS-DOS date and time values.
CoFreeAllLibrariesFrees all the DLLs that have been loaded with the CoLoadLibrary function (called internally by CoGetClassObject), regardless of whether they are currently in use.
CoFreeLibraryFrees a library that, when loaded, was specified to be freed explicitly.
CoFreeUnusedLibrariesUnloads any DLLs that are no longer in use.
CoFreeUnusedLibrariesExUnloads any DLLs that are no longer in use and whose unload delay has expired.
CoGetApartmentTypeQueries the current apartment type and type qualifier.
CoGetCallContextRetrieves the context of the current call on the current thread.
CoGetCallerTIDReturns a pointer to a DWORD that contains the apartment ID of the caller's thread.
CoGetCancelObjectObtains a pointer to a call control interface, normally ICancelMethodCalls, on the cancel object corresponding to an outbound COM method call pending on the same or another client thread.
CoGetClassObjectProvides a pointer to an interface on a class object associated with a specified CLSID.
CoGetContextTokenReturns a pointer to an implementation of IObjContext for the current context.
CoGetCurrentLogicalThreadIdReturns the logical thread id of the current physical thread.
CoGetCurrentProcessReturns a value that is unique to the current thread. CoGetCurrentProcess can be used to avoid thread ID reuse problems.
CoGetInstanceFromFileCreates a new object and initializes it from a file using IPersistFile::Load.
CoGetInstanceFromIStorageCreates a new object and initializes it from a storage object through an internal call to IPersistFile::Load.
CoGetInterceptorInstantiates the appropriate interceptor for the indicated interface to be intercepted and returns the newly created interceptor.
CoGetInterfaceAndReleaseStreamUnmarshals a buffer containing an interface pointer and releases the stream when an interface pointer has been marshaled from another thread to the calling thread.
CoGetMallocRetrieves a pointer to the default OLE task memory allocator (which supports the system implementation of the IMalloc interface) so applications can call its methods to manage memory.
CoGetMarshalSizeMaxReturns an upper bound on the number of bytes needed to marshal the specified interface pointer to the specified object.
CoGetObjectConverts a display name into a moniker that identifies the object named, and then binds to the object identified by the moniker.
CoGetObjectContextReturns the context for the current object.
CoGetPSClsidReturns the CLSID of the DLL that implements the proxy and stub for the specified interface.
CoGetStandardMarshalCreates a default, or standard, marshaling object in either the client process or the server process, depending on the caller, and returns a pointer to that object's IMarshal implementation.
CoGetStdMarshalExCreates an aggregated standard marshaler for use with lightweight client-side handlers.
CoGetTreatAsClassReturns the CLSID of an object that can emulate the specified object.
CoImpersonateClientEnables the server to impersonate the client of the current call for the duration of the call.
CoInitializeInitializes the COM library on the current thread and identifies the concurrency model as single-thread apartment (STA).
CoInitializeExInitializes the COM library for use by the calling thread, sets the thread's concurrency model, and creates a new apartment for the thread if one is required.
CoInitializeSecurityRegisters security and sets the default security values for the process.
CoInstallInstalls the requested COM server application.
CoInvalidateRemoteMachineBindingsTells the service control manager to flush any cached RPC binding handles for the specified computer.
CoIsHandlerConnectedDetermines whether a remote object is connected to the corresponding in-process object.
CoIsOle1ClassDetermines whether the specified CLSID represents an OLE 1 object.
CoLoadLibraryLoads a specific DLL into the caller's process.
CoLockObjectExternalCalled either to lock an object to ensure that it stays in memory, or to release such a lock.
CoMarshalHresultMarshals an HRESULT to the specified stream, from which it can be unmarshaled using the CoUnmarshalHresult function.
CoMarshalInterfaceWrites into a stream the data required to initialize a proxy object in some client process.
CoMarshalInterThreadInterfaceInStreamMarshals an interface pointer from one thread to another thread in the same process.
CoQueryAuthenticationServicesRetrieves a list of the authentication services registered when the process called CoInitializeSecurity.
CoQueryClientBlanketCalled by the server to find out about the client that invoked the method executing on the current thread.
CoQueryProxyBlanketRetrieves the authentication information the client uses to make calls on the specified proxy.
CoRegisterClassObjectRegisters an EXE class object with OLE so other applications can connect to it.
CoRegisterInitializeSpyRegisters an implementation of the IInitializeSpy interface. The IInitializeSpy interface is defied to allow developers to perform initialization and cleanup on COM apartments.
CoRegisterMallocSpyRegisters an implementation of the IMallocSpy interface, thereafter requiring OLE to call its wrapper methods around every call to the corresponding IMalloc method.
CoRegisterMessageFilterRegisters with OLE the instance of an IMessageFilter interface, which is to be used for handling concurrency issues on the current thread.
CoRegisterPSClsidEnables a downloaded DLL to register its custom interfaces within its running process so that the marshaling code will be able to marshal those interfaces.
CoRegisterSurrogateRegisters the surrogate process through its ISurrogate interface pointer.
CoReleaseMarshalDataDestroys a previously marshaled data packet.
CoReleaseServerProcessDecrements the global per-process reference count.
CoResumeClassObjectsCalled by a server that can register multiple class objects to inform the SCM about all registered classes, and permits activation requests for those class objects.
CoRevertToSelfRestores the authentication information on a thread of execution.
CoRevokeClassObjectInforms OLE that a class object, previously registered with the CoRegisterClassObject function, is no longer available for use.
CoRevokeInitializeSpyRevokes a registered implementation of the IInitializeSpy interface.
CoRevokeMallocSpyRevokes a registered IMallocSpy object.
CoSetCancelObjectSets (registers) or resets (unregisters) a cancel object for use during subsequent cancel operations on the current thread.
CoSetProxyBlanketSets the authentication information that will be used to make calls on the specified proxy.
CoSuspendClassObjectsPrevents any new activation requests from the SCM on all class objects registered within the process.
CoSwitchCallContextSwitches the call context object used by CoGetCallContext.
CoTaskMemAllocAllocates a block of task memory in the same way that IMalloc::Alloc does.
CoTaskMemFreeFrees a block of task memory previously allocated through a call to the CoTaskMemAlloc or CoTaskMemRealloc function.
CoTaskMemReallocChanges the size of a previously allocated block of task memory.
CoTestCancelDetermines whether the call being executed on the server has been canceled by the client.
CoTreatAsClassEstablishes or removes an emulation, in which objects of one class are treated as objects of a different class.
CoUninitializeCloses the COM library on the current thread, unloads all DLLs loaded by the thread, frees any other resources that the thread maintains, and forces all RPC connections on the thread to close.
CoUnmarshalHresultUnmarshals an HRESULT type from the specified stream.
CoUnmarshalInterfaceInitializes a newly created proxy using data written into the stream by a previous call to the CoMarshalInterface function, and returns an interface pointer to that proxy.
CoWaitForMultipleHandlesWaits for specified handles to be signaled or for a specified timeout period to elapse.
CreateAntiMonikerCreates and returns a new anti-moniker.
CreateAsyncBindCtxCreates an asynchronous bind context for use with asynchronous monikers.
CreateBindCtxReturns a pointer to an implementation of IBindCtx (a bind context object). This object stores information about a particular moniker-binding operation.
CreateClassMonikerCreates a class moniker that refers to the specified class.
CreateFileMonikerCreates a file moniker based on the specified path.
CreateGenericCompositePerforms a generic composition of two monikers and supplies a pointer to the resulting composite moniker.
CreateItemMonikerCreates an item moniker that identifies an object within a containing object (typically a compound document).
CreateObjrefMonikerCreates an OBJREF moniker based on a pointer to an object.
CreatePointerMonikerCreates a pointer moniker based on a pointer to an object.
DllCanUnloadNowDetermines whether the DLL that implements this function is in use. If not, the caller can unload the DLL from memory.
DllGetClassObjectRetrieves the class object from a DLL object handler or object application.
DllRegisterServerInstructs an in-process server to create its registry entries for all classes supported in this server module.
DllUnregisterServerInstructs an in-process server to remove only those entries created through DllRegisterServer.
GetClassFileReturns the CLSID associated with the specified filename.
GetRunningObjectTableReturns a pointer to the IRunningObjectTable interface on the local running object table (ROT).
IIDFromStringConverts a string generated by the StringFromIID function back into the original interface identifier (IID).
IsAcceleratorDetermines whether the specified keystroke maps to an accelerator in the specified accelerator table.
IsEqualCLSIDDetermines whether two CLSIDs are equal.
IsEqualGUIDDetermines whether two GUIDs are equal.
IsEqualIIDDetermines whether two interface identifiers are equal.
MkParseDisplayNameConverts a string into a moniker that identifies the object named by the string.
MonikerCommonPrefixWithCreates a new moniker based on the common prefix that this moniker (the one comprising the data of this moniker object) shares with another moniker.
MonikerRelativePathToProvides a moniker that, when composed onto the end of the first specified moniker (or one with a similar structure), yields the second specified moniker.
OleDoAutoConvertAutomatically converts an object to a new class if automatic conversion for that object class is set in the registry.
OleGetAutoConvertDetermines whether the registry is set for objects of a specified CLSID to be automatically converted to another CLSID, and if so, retrieves the new CLSID.
OleGetIconOfClassReturns a handle to a metafile containing an icon and a string label for the specified CLSID.
OleGetIconOfFileReturns a handle to a metafile containing an icon and string label for the specified file name.
OleIconToCursorConverts an icon to a cursor.
OleRegGetMiscStatusReturns miscellaneous information about the presentation and behaviors supported by the specified CLSID from the registry.
OleRegGetUserTypeGets the user type of the specified class from the registry.
OleSetAutoConvertSpecifies a CLSID for automatic conversion to a different class when an object of that class is loaded.
ProgIDFromCLSIDRetrieves the ProgID for a given CLSID.
StringFromCLSIDConverts a CLSID into a string of printable characters. Different CLSIDs always convert to different strings.
StringFromGUID2Converts a globally unique identifier (GUID) into a string of printable characters.
StringFromIIDConverts an interface identifier into a string of printable characters.

 

Send comments about this topic to Microsoft

Build date: 11/12/2009

© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View