Home COM GDI+ WebBrowser Data Access 

COM Fundamentals

 

Functions

 

BindMoniker

CLSIDFromProgID

CLSIDFromProgIDEx

CLSIDFromString

CoAddRefServerProcess

CoAllowSetForegroundWindow

CoBuildVersion

CoCancelCall

CoCopyProxy

CoCreateFreeThreadedMarshaler

CoCreateGuid

CoCreateInstance

CoCreateInstanceEx

CoCreateStandardMalloc

CoDisableCallCancellation

CoDisconnectObject

CoDosDateTimeToFileTime

CoEnableCallCancellation

CoFileTimeNow

CoFileTimeToDosDateTime

CoFreeAllLibraries

CoFreeLibrary

CoFreeUnusedLibraries

CoFreeUnusedLibrariesEx

CoGetCallContext

CoGetCallerTID

CoGetCancelObject

CoGetClassObject

CoGetContextToken

CoGetCurrentProcess

CoGetInstanceFromFile

CoGetInstanceFromIStorage

CoGetInterceptor

CoGetInterfaceAndReleaseStream

CoGetMalloc

CoGetMarshalSizeMax

CoGetObject

CoGetObjectContext

CoGetPSClsid

CoGetStandardMarshal

CoGetStdMarshalEx

CoGetTreatAsClass

CoImpersonateClient

CoInitialize

CoInitializeEx

CoInitializeSecutiry

CoInstall

CoInvalidateRemotemachineBindings

CoIsHandlerConnected

CoIsOle1Class

CoLoadLibrary

CoLockObjectExternal

CoMarshalHresult

CoMarshalInterface

CoMarshalInterThreadInterfaceInStream

CoQueryAuthenticationServices

CoQueryClientBlanket

CoQueryProxyBlanket

CoRegisterClassObject

CoRegisterInitializeSpy

CoRegisterMallocSpy

CoRegisterMessageFilter

CoRegisterPSClsid

CoRegisterSurrogate

CoRegisterSurrogateEx

CoReleaseMarshalData

CoReleaseServerProcess

CoResumeClassObjects

CoRevertToSelf

CoRevokeClassObject

 

 

CoRevokeInitializeSpy

CoRevokeMallocSpy

CoSetCancelObject

CoSetProxyBlanket

CoSuspendClassObjects

CoSwitchCallContext

CoTaskMemAlloc

CoTaskMemFree

CoTaskMemRealloc

CoTestCancel

CoTreatAsClass

CoUninitialize

CoUnmarshalHresult

CoUnmarshalInterface

CoWaitForMultipleHandles

CreateAntiMoniker

CreateAsyncBindCtx

CreateBindCtx

CreateClassMoniker

CreateFileMoniker

CreateGenericComposite

CreateItemMoniker

CreateObjrefMoniker

CreatePointerMoniker

DllCanUnloadNow

DllGetClassObject

DllRegisterServer

DllUnregisterServer

FAILED

GetClassFile

GetRunningObjectTable

GetScode (obsolete)

HRESULT_CODE

HRESULT_FACILITY

HRESULT_FROM_NT

HRESULT_FROM_WIN32

HRESULT_SEVERITY

IIDFromString

IsAccelerator

IS_ERROR

IsEqualGUID

IsEqualCLSID

IsEqualIID

IsValidIid (obsolete)

IsValidInterface (obsolete)

IsValidPtrIn (obsolete)

IsValidPtrOut (obsolete)

MAKE_HRESULT

MAKE_SCODE

MkParseDisplayName

MonikerCommonPrefixWith

MonikerRelativePathTo

OleDoAutoConvert

OleGetAutoConvert

OleGetIconOfClass

OleGetIconOfFile

OleIconToCursor

OleRegGetMiscStatus

OleRecGetUserType

OleSetAutoConvert

ProgIDFromCLSID

PropagateResult (obsolete)

ResultFromScode (obsolete)

SCODE_CODE

SCODE_FACILITY

SCODE_SEVERITY

StringFromCLSID

StringFromGUID2

StrinfFromIID

SUCCEEDED

 

 

BindMoniker

 

Locates 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.
 

 

DECLARE FUNCTION BindMoniker _

   LIB "OLE32.DLL" _

   ALIAS "BindMoniker" ( _

   BYVAL pmk AS DWORD, _

   BYVAL grfOpt AS DWORD, _

   BYREF iidResult AS GUID, _

   BYREF ppvResult AS DWORD _

) AS LONG
 

 

CLSIDFromProgID

 

Looks up a CLSID in the registry, given a ProgID.
 

 

' Use: DIM hr AS DWORD, ProgID AS STRING, clsid AS GUID
' ProgID = UCODE$("Shell.Explorer.1" & $NUL)

' hr = CLSIDFromProgID(ProgID, clsid))
 

DECLARE FUNCTION CLSIDFromProgID _

   LIB "OLE32.DLL" _

   ALIAS "CLSIDFromProgID" ( _

   BYVAL lpszProgID AS STRING, _  ' Null-terminated unicode string

   BYREF pclsid AS GUID _

) AS DWORD
 

 

CLSIDFromProgIDEx

 

CLSIDFromProgIDEx triggers automatic installation if the COMClassStore Policy is enabled (analogous to the behavior of CoCreateInstance(Ex) when neither CLSCTX_ENABLE_CODE_DOWNLOAD nor CLSCTX_NO_CODE_DOWNLOAD are specified).
 

 

DECLARE FUNCTION CLSIDFromProgIDEx _

   LIB "OLE32.DLL" _

   ALIAS "CLSIDFromProgIDEx" ( _

   BYVAL lpszProgID AS STRING, _  ' Null-terminated unicode string

   BYREF pclsid AS GUID _

) AS DWORD
 

 

CLSIDFromString

 

Converts a string generated by the StringFromCLSID function back into the original CLSID.
 

 

DECLARE FUNCTION CLSIDFromString _

   LIB "OLE32.DLL" _

   ALIAS "CLSIDFromString" ( _

   BYVAL lpsz AS STRING, _  ' Null-terminated unicode string

   BYREF pclsid AS GUID _

) AS DWORD
 

 

CoAddRefServerProcess

 

Increments a global per-process reference count.
 

 

DECLARE FUNCTION CoAddRefServerProcess _

   LIB "OLE32.DLL" _

   ALIAS "CoAddRefServerProcess" ( _

) AS DWORD
 

 

CoAllowSetForegroundWindow

 

The system restricts which processes can call the SetForegroundWindow function and AllowSetForegroundWindow to set the foreground window. As a result, an application is blocked from stealing the focus from another application even when the user is interacting with it. The CoAllowSetForegroundWindow function enables the COM server process called to take focus away from the client application by using the IForegroundTransfer interface. The COM client then yields the foreground window to the specified COM server process whose proxy is pUnk. Yielding the foreground window is useful when the client wants a window owned by the server process to take focus.
 

 

DECLARE FUNCTION CoAllowSetForegroundWindow _

   LIB "OLE32.DLL" _

   ALIAS "CoAllowSetForegroundWindow" ( _

   BYVAL punk AS DWORD, _

   BYVAL lpvReserved AS DWORD _

) AS LONG
 

 

CoBuildVersion

 

This function is obsolete.
 

 

DECLARE FUNCTION CoBuildVersion _

   LIB "OLE32.DLL" _

   ALIAS "CoBuildVersion" ( _

) AS DWORD
 

 

CoCancelCall

 

Requests cancellation of an outbound DCOM method call pending on a specified thread.
 

 

DECLARE FUNCTION CoCancelCall _

   LIB "OLE32.DLL" _

   ALIAS "CoCancelCall" ( _

   BYVAL dwThreadID AS DWORD, _

   BYVAL ulTimeOut AS DWORD _

) AS LONG
 

 

CoCopyProxy

 

Makes a private copy of the specified proxy.
 

 

DECLARE FUNCTION CoCopyProxy _

   LIB "OLE32.DLL" _

   ALIAS "CoCopyProxy" ( _

   BYVAL pProxy AS DWORD, _

   BYREF ppCopy AS DWORD _

) AS LONG
 

 

CoCreateFreeThreadedMarshaler

 

Creates an aggregatable object capable of context-dependent marshaling.
 

 

DECLARE FUNCTION CoCreateFreeThreadedMarshaler _

   LIB "OLE32.DLL" _

   ALIAS "CoCreateFreeThreadedMarshaler" ( _

   BYVAL punkOuter AS DWORD, _

   BYREF ppunkMarshaler AS DWORD _

) AS LONG
 

 

CoCreateGuid

 

Creates a GUID, a unique 128-bit integer used for CLSIDs and interface identifiers.
 

 

DECLARE FUNCTION CoCreateGuid _

   LIB "OLE32.DLL" _

   ALIAS "CoCreateGuid" ( _

   BYREF pGuid AS GUID _

) AS LONG
 

 

CoCreateInstance

 

Creates a single uninitialized object of the class associated with a specified CLSID. Call CoCreateInstance when you want to create only one object on the local system. To create a single object on a remote system, call CoCreateInstanceEx. To create multiple objects based on a single CLSID, refer to the CoGetClassObject function.
 

 

DECLARE FUNCTION CoCreateInstance _

   LIB "OLE32.DLL" _

   ALIAS "CoCreateInstance" ( _

   BYREF rclsid AS GUID, _

   BYREF pUnkOuter AS ANY, _

   BYVAL dwClsContext AS DWORD, _

   BYREF riid AS GUID, _

   BYREF ppv AS DWORD _

) AS LONG
 

 

CoCreateInstanceEx

 

Creates a single uninitialized object of the class associated with a specified CLSID. Call CoCreateInstance when you want to create only one object on the local system. To create a single object on a remote system, call CoCreateInstanceEx. To create multiple objects based on a single CLSID, refer to the CoGetClassObject function.
 

 

DECLARE FUNCTION CoCreateInstanceEx _

   LIB "OLE32.DLL" _

   ALIAS "CoCreateInstanceEx" ( _

   BYREF rclsid AS GUID, _

   BYREF pUnkOuter AS ANY, _

   BYVAL dwClsContext AS DWORD, _

   BYREF pServerInfo AS COSERVERINFO, _

   BYVAL cmq AS LONG, _

   BYVAL pResults AS DWORD _

) AS LONG
 

 

CoCreateStandardMalloc

 

This function is obsolete. Refer to CoGetMalloc.
 

 

CoDisableCallCancellation

 

Converts the MS-DOS representation of the time and date to a FILETIME structure, which Win32 uses to determine the date and time.
 

 

DECLARE FUNCTION CoDisableCallCancellation _

   LIB "OLE32.DLL" _

   ALIAS "CoDisableCallCancellation" ( _

   BYVAL pReserved AS DWORD _

) AS LONG
 

 

CoDisconnectObject

 

Disconnects all remote process connections being maintained on behalf of all the interface pointers that point to a specified object. Only the process that actually manages the object should call CoDisconnectObject.
 

 

DECLARE FUNCTION CoDisconnectObject _

   LIB "OLE32.DLL" _

   ALIAS "CoDisconnectObject" ( _

   BYVAL pUnk AS DWORD, _

   BYVAL dwReserved AS DWORD _

) AS LONG
 

 

CoDosDateTimeToFileTime

 

Converts the MS-DOS representation of the time and date to a FILETIME structure, which Win32 uses to determine the date and time.
 

 

DECLARE FUNCTION CoDosDateTimeToFileTime _

   LIB "OLE32.DLL" _

   ALIAS "CoDosDateTimeToFileTime" ( _

   BYVAL nDosDate AS WORD, _

   BYVAL nDosTime AS WORD, _

   BYREF lpFileTime AS FILETIME _

) AS LONG
 

 

CoEnableCallCancellation

 

Enables cancellation of synchronous calls on the calling thread.
 

 

DECLARE FUNCTION CoEnableCallCancellation _

   LIB "OLE32.DLL" _

   ALIAS "CoEnableCallCancellation" ( _

   BYVAL pvReserved AS DWORD _

) AS LONG
 

 

CoFileTimeNow

 

Returns the current time as a FILETIME structure.
 

 

DECLARE FUNCTION CoFileTimeNow _

   LIB "OLE32.DLL" _

   ALIAS "CoFileTimeNow" ( _

   BYREF lpFileTime AS FILETIME _

) AS LONG
 

 

CoFileTimeToDosDateTime

 

Returns the current time as a FILETIME structure.
 

 

DECLARE FUNCTION CoFileTimeToDosDateTime _

   LIB "OLE32.DLL" _

   ALIAS "CoFileTimeToDosDateTime" ( _

   BYREF lpFileTime AS FILETIME, _

   BYREF lpDosDate AS WORD, _

   BYREF lpDosTime AS WORD _

) AS LONG
 

 

CoFreeAllLibraries

 

Frees all the DLLs that have been loaded with the CoLoadLibrary function (called internally by CoGetClassObject), regardless of whether they are currently in use. This function is usually not called directly, because CoUninitialize and OleUninitialize call it internally.
 

 

DECLARE SUB CoFreeAllLibraries _

   LIB "OLE32.DLL" _

   ALIAS "CoFreeAllLibraries" ( _

)
 

 

CoFreeLibrary

 

Frees a library that, when loaded, was specified to be freed explicitly.
 

 

DECLARE SUB CoFreeLibrary _

   LIB "OLE32.DLL" _

   ALIAS "CoFreeLibrary" ( _

   BYVAL hInst AS DWORD _

)
 

 

CoFreeUnusedLibraries

 

Unloads any DLLs that are no longer in use and that, when loaded, were specified to be freed automatically.
 

 

DECLARE SUB CoFreeUnusedLibraries _

   LIB "OLE32.DLL" _

   ALIAS "CoFreeUnusedLibraries" ( _

)
 

 

CoFreeUnusedLibrariesEx

 

Unloads any DLLs that are no longer in use and whose unload delay has expired.
 

 

DECLARE SUB CoFreeUnusedLibrariesEx _

   LIB "OLE32.DLL" _

   ALIAS "CoFreeUnusedLibrariesEx" ( _

)
 

 

CoGetCallContext

 

Unloads any DLLs that are no longer in use and whose unload delay has expired.
 

 

DECLARE FUNCTION CoGetCallContext _

   LIB "OLE32.DLL" _

   ALIAS "CoGetCallContext" ( _

   BYREF riid AS GUID, _

   BYREF ppInterface AS DWORD _

) AS LONG
 

 

CoGetCallerTID

 

Returns a GUID identifying the callers thread.
 

 

DECLARE FUNCTION CoGetCallerTID _

   LIB "OLE32.DLL" _

   ALIAS "CoGetCallerTID" ( _

   BYREF lpdwTID AS DWORD _

) AS LONG
 

 

CoGetCancelObject

 

Obtains 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.
 

 

DECLARE FUNCTION CoGetCancelObject _

   LIB "OLE32.DLL" _

   ALIAS "CoGetCancelObject" ( _

   BYVAL dwThreadID AS DWORD, _

   BYREF riid AS GUID, _

   BYREF ppUnk AS DWORD _

) AS LONG
 

 

CoGetClassObject

 

Provides a pointer to an interface on a class object associated with a specified CLSID. CoGetClassObject locates, and if necessary, dynamically loads the executable code required to do this.

 

Call CoGetClassObject directly when you want to create multiple objects through a class object for which there is a CLSID in the system registry. You can also retrieve a class object from a specific remote machine. Most class objects implement the IClassFactory interface. You would then call IClassFactory::CreateInstance to create an uninitialized object. It is not always necessary to go through this process. To create a single object, call instead the either the CoCreateInstanceEx function, which allows you to create an instance on a remote machine. This replaces the CoCreateInstance function, which can still be used to create an instance on a local machine. Both functions encapsulate connecting to the class object, creating the instance, and releasing the class object. Two other functions, CoGetInstanceFromFile and CoGetInstanceFromIStorage, provide both instance creation on a remote system, and object activation. OLE also provides many other ways to create an object in the form of numerous helper functions and interface methods whose function is to create objects of a single type and provide a pointer to an interface on that object.

 

Note The CoGetClassObject function does not call CoLoadLibrary.
 

 

DECLARE FUNCTION CoGetClassObject _

   LIB "OLE32.DLL" _

   ALIAS "CoGetClassObject" ( _

   BYREF rclsid AS GUID, _

   BYVAL dwclsContext AS DWORD, _

   BYREF pServerInfo AS COSERVERINFO, _

   BYREF riid AS GUID, _

   BYREF ppv AS DWORD _

) AS LONG
 

 

CoGetContextToken

 

Returns a pointer to an implementation of IObjContext for the current context.

 

 

DECLARE FUNCTION CoGetContextToken _

   LIB "OLE32.DLL" _

   ALIAS "CoGetContextToken" ( _

   BYREF pToken AS DWORD _

) AS LONG
 

 

CoGetCurrentProcess

 

Returns a value that is unique to the current thread. CoGetCurrentProcess can be used to avoid thread ID reuse problems.
 

 

DECLARE FUNCTION CoGetCurrentProcess _

   LIB "OLE32.DLL" _

   ALIAS "CoGetCurrentProcess" ( _

) AS DWORD
 

 

CoGetInstanceFromFile

 

Creates a new object and initializes it from a file using IPersistFile::Load.
 

 

DECLARE FUNCTION CoGetInstanceFromFile _

   LIB "OLE32.DLL" _

   ALIAS "CoGetInstanceFromFile" ( _

   BYREF pServerInfo AS COSERVERINFO, _

   BYREF pclsid AS GUID, _

   BYVAL punkPuter AS DWORD, _

   BYVAL dwClsCtx AS DWORD, _

   BYVAL grfMode AS DWORD, _

   BYVAL szName AS STRING, _  ' Null-terminated unicode string

   BYVAL cmq AS DWORD, _

   BYVAL rgmqResults AS DWORD _

) AS LONG
 

 

CoGetInstanceFromIStorage

 

Creates a new object and initializes it from a storage object through an internal call to IPersistStorage::Load.
 

 

DECLARE FUNCTION CoGetInstanceFromIStorage _

   LIB "OLE32.DLL" _

   ALIAS "CoGetInstanceFromIStorage" ( _

   BYREF pServerInfo AS COSERVERINFO, _

   BYREF pclsid AS GUID, _

   BYVAL punkPuter AS DWORD, _

   BYVAL dwClsCtx AS DWORD, _

   BYVAL pstg AS DWORD, _

   BYVAL cmq AS DWORD, _

   BYVAL rgmqResults AS DWORD _

) AS LONG
 

 

CoGetInterceptor

 

Instantiates the appropriate interceptor for the indicated interface to be intercepted and returns the newly created interceptor.
 

 

DECLARE FUNCTION CoGetInterceptor _

   LIB "OLE32.DLL" _

   ALIAS "CoGetInterceptor" ( _

   BYREF iidIntercepted AS GUID, _

   BYVAL punkOuter AS DWORD, _

   BYREF iid AS GUID, _

   BYREF ppv AS DWORD _

) AS LONG
 

 

CoGetInterfaceAndReleaseStream

 

Unmarshals a buffer containing an interface pointer and releases the stream when an interface pointer has been marshaled from another thread to the calling thread.
 

 

DECLARE FUNCTION CoGetInterfaceAndReleaseStream _

   LIB "OLE32.DLL" _

   ALIAS "CoGetInterfaceAndReleaseStream" ( _

   BYVAL pStm AS DWORD, _

   BYREF riid AS GUID, _

   BYREF ppv AS DWORD _

) AS LONG
 

 

CoGetMalloc

 

Retrieves 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.
 

 

DECLARE FUNCTION CoGetMalloc _

   LIB "OLE32.DLL" _

   ALIAS "CoGetMalloc" ( _

   BYVAL dwMemContext AS DWORD, _

   BYREF ppMalloc AS DWORD _

) AS LONG
 

 

CoGetMarshalSizeMax

 

Returns an upper bound on the number of bytes needed to marshal the specified interface pointer to the specified object.
 

 

DECLARE FUNCTION CoGetMarshalSizeMax _

   LIB "OLE32.DLL" _

   ALIAS "CoGetMarshalSizeMax" ( _

   BYREF pulSize AS DWORD, _

   BYREF riid AS GUID, _

   BYVAL pUnk AS DWORD, _

   BYVAL dwDestContext AS DWORD, _

   BYVAL pvDestContext AS DWORD, _

   BYVAL mshlflags AS DWORD _

) AS LONG
 

 

CoGetObject

 

Converts a display name into a moniker that identifies the object named, and then binds to the object identified by the moniker.
 

 

DECLARE FUNCTION CoGetObject _

   LIB "OLE32.DLL" _

   ALIAS "CoGetObject" ( _

   BYVAL pszName AS STRING, _  ' Null-terminated unicode string

   BYVAL pBindOptions AS DWORD, _

   BYREF riid AS GUID, _

   BYREF ppv AS DWORD _

) AS LONG
 

 

CoGetObjectContext

 

Gets the context for the current object.
 

 

DECLARE FUNCTION CoGetObjectContext _

   LIB "OLE32.DLL" _

   ALIAS "CoGetObjectContext" ( _

   BYREF riid AS GUID, _

   BYREF ppv AS DWORD _

) AS LONG
 

 

CoGetPSClsid

 

This function returns the CLSID of the DLL that implements the proxy and stub for the specified interface.
 

 

DECLARE FUNCTION CoGetPSClsid _

   LIB "OLE32.DLL" _

   ALIAS "CoGetPSClsid" ( _

   BYREF riid AS GUID, _

   BYREF pclsid AS GUID _

) AS LONG
 

 

CoGetStandardMarshal

 

Creates 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.

 

 

DECLARE FUNCTION CoGetStandardMarshal _

   LIB "OLE32.DLL" _

   ALIAS "CoGetStandardMarshal" ( _

   BYREF riid AS GUID, _

   BYVAL pUnk AS DWORD, _

   BYVAL dwDestContext AS DWORD, _

   BYVAL pvDestContext AS DWORD, _

   BYVAL mshlflags AS DWORD, _

   BYREF ppMarshal AS DWORD _

) AS LONG
 

 

CoGetStdMarshalEx

 

Creates an aggregated standard marshaler for use with lightweight client-side handlers.

 

 

DECLARE FUNCTION CoGetStdMarshalEx _

   LIB "OLE32.DLL" _

   ALIAS "CoGetStdMarshalEx" ( _

   BYVAL pUnkOuter AS DWORD, _

   BYVAL dwSMExFlags AS DWORD, _

   BYREF ppUnkInner AS DWORD _

) AS LONG
 

 

CoGetTreatAsClass

 

Returns the CLSID of an object that can emulate the specified object.

 

 

DECLARE FUNCTION CoGetTreatAsClass _

   LIB "OLE32.DLL" _

   ALIAS "CoGetTreatAsClass" ( _

   BYREF clsidOld AS GUID, _

   BYREF pclsidNew AS GUID _

) AS LONG
 

 

CoImpersonateClient

 

Allows the server to impersonate the client of the current call for the duration of the call.

 

 

DECLARE FUNCTION CoImpersonateClient _

   LIB "OLE32.DLL" _

   ALIAS "CoImpersonateClient" ( _

) AS LONG
 

 

CoInitialize

 

Initializes the COM library on the current thread and identifies the concurrency model as single-thread apartment (STA). Applications must initialize the COM library before they can call COM library functions other than CoGetMalloc and memory allocation functions.
 

 

DECLARE FUNCTION CoInitialize _

   LIB "OLE32.DLL" _

   ALIAS "CoInitialize" ( _

   BYREF pvReserved AS DWORD _

) AS LONG
 

 

CoInitializeEx

 

Initializes 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.
 

 

DECLARE FUNCTION CoInitializeEx _

   LIB "OLE32.DLL" _

   ALIAS "CoInitializeEx" ( _

   BYREF pvReserved AS DWORD, _

   BYVAL dwCoInit AS DWORD _

) AS LONG
 

 

CoInitializeSecurity

 

Registers security and sets the default security values for the process. This function is called exactly once per process, either explicitly or implicitly. It can be called by the client, server, or both. For legacy applications and other applications that do not explicitly call CoInitializeSecurity, COM calls this function implicitly with values from the registry. If you set processwide security using the registry and then call CoInitializeSecurity, the AppID registry values will be ignored and the CoInitializeSecurity values will be used.
 

 

DECLARE FUNCTION CoInitializeSecurity _

   LIB "OLE32.DLL" _

   ALIAS "CoInitializeSecurity" ( _

   BYVAL pVoid AS DWORD, _

   BYVAL cAuthSvc AS LONG, _

   BYVAL asAuthSvc AS DWORD, _

   BYVAL pReserved1 AS DWORD, _

   BYVAL dwAuthnLevel AS DWORD, _

   BYVAL dwImpLevel AS DWORD, _

   BYVAL pAuthList AS DWORD, _

   BYVAL dwCapabilities AS DWORD, _

   BYVAL pReserved3 AS DWORD _

) AS LONG
 

 

CoInstall

 

Installs the requested COM server application. This function is likely to be deprecated in future releases.
 

 

DECLARE FUNCTION CoInstall _

   LIB "OLE32.DLL" _

   ALIAS "CoInstall" ( _

   BYVAL pbc AS DWORD, _

   BYVAL dwFlags AS DWORD, _

   BYVAL pClassSpec AS DWORD, _

   BYVAL pQuery AS DWORD, _

   BYVAL pszCodeName AS DWORD' Must be mull

) AS LONG
 

 

CoInvalidateRemoteMachineBindings

 

Installs the requested COM server application. This function is likely to be deprecated in future releases.
 

 

DECLARE FUNCTION CoInvalidateRemoteMachineBindings _

   LIB "OLE32.DLL" _

   ALIAS "CoInvalidateRemoteMachineBindings" ( _

   BYVAL pszMachineName AS STRING' Null-terminated unicode string

) AS LONG
 

 

CoIsHandlerConnected

 

Determines whether a remote object is connected to the corresponding in-process object.
 

 

DECLARE FUNCTION CoIsHandlerConnected _

   LIB "OLE32.DLL" _

   ALIAS "CoIsHandlerConnected" ( _

   BYVAL pUnk AS DWORD _

) AS LONG
 

 

CoIsOle1Class

 

Determines if a given CLSID represents an OLE 1 object.
 

 

DECLARE FUNCTION CoIsOle1Class _

   LIB "OLE32.DLL" _

   ALIAS "CoIsOle1Class" ( _

   BYREF riid AS GUID _

) AS LONG
 

 

CoLoadLibrary

 

Loads a specific DLL into the caller's process. CoLoadLibrary is equivalent to LoadLibraryEx. CoLoadLibrary does not do anything about the lifetime of the library.
 

 

DECLARE FUNCTION CoLoadLibrary _

   LIB "OLE32.DLL" _

   ALIAS "CoLoadLibrary" ( _

   BYVAL lpszLibName AS STRING, _  ' Null-terminated unicode string

   BYVAL bAutoFree AS LONG _

) AS LONG
 

 

CoLockObjectExternal

 

Called either to lock an object to ensure that it stays in memory, or to release such a lock. Call CoLockObjectExternal to place a strong lock on an object to ensure that it stays in memory.
 

 

DECLARE FUNCTION CoLockObjectExternal _

   LIB "OLE32.DLL" _

   ALIAS "CoLockObjectExternal" ( _

   BYVAL pUnk AS DWORD, _

   BYVAL fLock AS LONG, _

   BYVAL fLastUnlockReleases AS LONG _

) AS LONG
 

 

CoMarshalHresult

 

Marshals an HRESULT to the specified stream, from which it can be unmarshaled using the CoUnmarshalHresult function.
 

 

DECLARE FUNCTION CoMarshalHresult _

   LIB "OLE32.DLL" _

   ALIAS "CoMarshalHresult" ( _

   BYVAL pStm AS DWORD, _

   BYVAL hresult AS LONG _

) AS LONG
 

 

CoMarshalInterface

 

Writes into a stream the data required to initialize a proxy object in some client process. The COM library in the client process calls the CoUnmarshalInterface function to extract the data and initialize the proxy. Before calling CoUnmarshalInterface, seek back to the original position in the stream. CoMarshalInterface can marshal only interfaces derived from IUnknown.
 

 

DECLARE FUNCTION CoMarshalInterface _

   LIB "OLE32.DLL" _

   ALIAS "CoMarshalInterface" ( _

   BYVAL pStm AS DWORD, _

   BYREF riid AS GUID, _

   BYVAL pUnk AS DWORD, _

   BYVAL dwDestContext AS DWORD, _

   BYVAL pvDestContext AS DWORD, _

   BYVAL mshlflags AS DWORD _

) AS LONG
 

 

CoMarshalInterThreadInterfaceInStream

 

Marshals an interface pointer from one thread to another thread in the same process.
 

 

DECLARE FUNCTION CoMarshalInterThreadInterfaceInStream _

   LIB "OLE32.DLL" _

   ALIAS "CoMarshalInterThreadInterfaceInStream" ( _

   BYREF riid AS GUID, _

   BYVAL pUnk AS DWORD, _

   BYREF ppStm AS DWORD _

) AS LONG
 

 

CoQueryAuthenticationServices

 

Marshals an interface pointer from one thread to another thread in the same process.