2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib\ole32\CoXxx.c
5 * PURPOSE: The Co... function implementation
6 * PROGRAMMER: jurgen van gael [jurgen.vangael@student.kuleuven.ac.be]
10 /********************************************************************
13 This library is free software; you can redistribute it and/or
14 modify it under the terms of the GNU Library General Public License as
15 published by the Free Software Foundation; either version 2 of the
16 License, or (at your option) any later version.
18 This library is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 Library General Public License for more details.
23 You should have received a copy of the GNU Library General Public
24 License along with this library; see the file COPYING.LIB. If
25 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
26 Cambridge, MA 02139, USA.
29 ********************************************************************/
32 #include <ole32/ole32.h>
37 // lCOMLockCount is a reference count, when it reaches 0, all COM libraries are freed
39 static ULONG lCOMLockCount = 0;
41 WINOLEAPI_(ULONG) CoAddRefServerProcess()
48 WINOLEAPI CoAllowSetForegroundWindow(IUnknown *pUnk, LPVOID lpvReserved)
56 WINOLEAPI CoCancelCall(DWORD dwThreadId, ULONG ulTimeout)
63 WINOLEAPI CoCopyProxy(IUnknown* pProxy, IUnknown** ppCopy)
73 WINOLEAPI CoDisableCallCancellation(LPVOID pvReserved)
83 WINOLEAPI_(BOOL) CoDosDateTimeToFileTime(WORD nDosDate, WORD nDosTime, FILETIME* lpFileTime)
93 WINOLEAPI CoEnableCallCancellation(LPVOID pvReserver)
103 WINOLEAPI_(BOOL) CoFileTimeToDosDateTime(FILETIME* lpFileTime, LPWORD lpDosDate, LPWORD lpDosTime)
113 WINOLEAPI CoGetCallContext(REFIID riid, void** ppInterface)
123 WINOLEAPI CoGetCancelObject(DWORD dwThreadId, REFIID iid, void** ppUnk)
133 WINOLEAPI_(DWORD) CoGetCurrentProcess()
143 WINOLEAPI CoGetInstanceFromFile(COSERVERINFO* pServerInfo, CLSID* pClsid, IUnknown* punkOuter,
144 DWORD dwClsCtx, DWORD grfMode, OLECHAR* pwszName, DWORD dwCount, MULTI_QI* pResults)
154 WINOLEAPI CoGetInstanceFromIStorage(COSERVERINFO* pServerInfo, CLSID* pClsid, IUnknown* punkOuter,
155 DWORD dwClsCtx, IStorage *pstg, DWORD dwCount, MULTI_QI* pResults)
165 WINOLEAPI CoGetInterfaceAndReleaseStream(LPSTREAM pStm, REFIID iid, LPVOID* ppv)
175 WINOLEAPI CoGetMarshalSizeMax(ULONG* pulSize, REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext,
176 LPVOID pvdestContext, DWORD mshlflags)
186 WINOLEAPI CoGetObject(LPCWSTR pszName, BIND_OPTS* pBindOptions, REFIID riid, void** ppv)
196 WINOLEAPI CoGetObjectContext(REFIID riid, LPVOID FAR* ppv)
206 WINOLEAPI CoGetStandardMarshal(REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvdestContext,
207 DWORD mshlflags, LPMARSHAL* ppMarshal)
217 WINOLEAPI CoGetStdMarshalEx(LPUNKNOWN pUnkOuter, DWORD smexflags, LPUNKNOWN* ppUnkInner)
227 WINOLEAPI CoGetTreatAsClass(REFCLSID clsidOld, LPCLSID pClsidNew)
237 WINOLEAPI CoImpersonateClient()
244 WINOLEAPI CoRegisterMallocSpy(LPMALLOCSPY pMallocSpy)
251 WINOLEAPI CoRevokeMallocSpy()
258 WINOLEAPI CoSuspendClassObjects()
265 WINOLEAPI_(ULONG) CoReleaseServerProcess()
272 WINOLEAPI CoRegisterPSClsid(IN REFIID riid, IN REFCLSID rclsid)
280 WINOLEAPI CoRegisterSurrogate(IN LPSURROGATE pSurrogate)
288 WINOLEAPI CoMarshalInterface(LPSTREAM pStm, REFIID riid, LPUNKNOWN pUnk, DWORD dwDestContext, LPVOID pvDestContext,
296 WINOLEAPI CoUnmarshalInterface(LPSTREAM pStm, REFIID riid, LPVOID FAR* ppv)
303 WINOLEAPI CoMarshalHresult(LPSTREAM pstm, HRESULT hresult)
310 WINOLEAPI CoUnmarshalHresult(LPSTREAM pstm, HRESULT FAR * phresult)
317 WINOLEAPI CoReleaseMarshalData(LPSTREAM pStm)
324 WINOLEAPI_(BOOL) CoIsHandlerConnected(LPUNKNOWN pUnk)
332 WINOLEAPI CoMarshalInterThreadInterfaceInStream(REFIID riid, LPUNKNOWN pUnk, LPSTREAM *ppStm)
339 WINOLEAPI CoInitializeSecurity(
340 PSECURITY_DESCRIPTOR pSecDesc,
342 SOLE_AUTHENTICATION_SERVICE *asAuthSvc,
347 DWORD dwCapabilities,
355 WINOLEAPI CoQueryProxyBlanket(
359 OLECHAR **pServerPrincName,
362 RPC_AUTH_IDENTITY_HANDLE *pAuthInfo,
363 DWORD *pCapabilites )
370 WINOLEAPI CoSetProxyBlanket(
374 OLECHAR *pServerPrincName,
377 RPC_AUTH_IDENTITY_HANDLE pAuthInfo,
378 DWORD dwCapabilities )
385 WINOLEAPI CoQueryClientBlanket(
388 OLECHAR **pServerPrincName,
391 RPC_AUTHZ_HANDLE *pPrivs,
392 DWORD *pCapabilities )
400 WINOLEAPI CoRevertToSelf()
407 WINOLEAPI CoQueryAuthenticationServices(
409 SOLE_AUTHENTICATION_SERVICE **asAuthSvc )
416 WINOLEAPI CoSwitchCallContext(IUnknown *pNewObject, IUnknown **ppOldObject )
423 WINOLEAPI CoSetCancelObject(IUnknown *pUnk)
430 WINOLEAPI CoTestCancel()
437 WINOLEAPI CoRegisterMessageFilter( IN LPMESSAGEFILTER lpMessageFilter,
438 OUT LPMESSAGEFILTER FAR* lplpMessageFilter)
446 WINOLEAPI CoRegisterChannelHook(REFGUID ExtensionUuid, IChannelHook *pChannelHook )
454 WINOLEAPI CoWaitForMultipleHandles(IN DWORD dwFlags,
457 IN LPHANDLE pHandles,
458 OUT LPDWORD lpdwindex)
465 WINOLEAPI CoTreatAsClass(IN REFCLSID clsidOld, IN REFCLSID clsidNew)