4 * Copyright 1995 Martin von Loewis
14 #include "wine/obj_base.h"
15 #include "wine/obj_clientserver.h"
16 #include "wine/obj_storage.h"
17 #include "wine/obj_moniker.h"
19 /******************************************************************************
20 * These are static/global variables that the OLE module uses to maintain
25 * This is the lock count on the OLE library. It is controlled by the
26 * OLEInitialize/OLEUninitialize methods.
28 static ULONG s_OLEModuleLockCount
= 0;
30 /******************************************************************************
31 * OleBuildVersion [OLE2.1]
33 DWORD WINAPI
OleBuildVersion(void)
35 TRACE(ole
,"(void)\n");
39 /***********************************************************************
40 * OleInitialize (OLE2.2) (OLE32.108)
42 HRESULT WINAPI
OleInitialize(LPVOID reserved
)
46 TRACE(ole
, "(%p)\n", reserved
);
49 * The first duty of the OleInitialize is to initialize the COM libraries.
51 hr
= CoInitializeEx32(NULL
, COINIT_APARTMENTTHREADED
);
54 * If the CoInitializeEx call failed, the OLE libraries can't be
61 * Then, it has to initialize the OLE specific modules.
65 * Object linking and Embedding
68 if (s_OLEModuleLockCount
==0)
71 * Initialize the libraries.
73 TRACE(ole
, "() - Initializing the OLE libraries\n");
77 * Then, we increase the lock count on the OLE module.
79 s_OLEModuleLockCount
++;
84 /******************************************************************************
85 * CoGetCurrentProcess [COMPOBJ.34] [OLE2.2][OLE32.108]
88 * Is DWORD really the correct return type for this function?
90 DWORD WINAPI
CoGetCurrentProcess(void) {
91 return (DWORD
)PROCESS_Current();
94 /******************************************************************************
95 * OleUninitialize [OLE2.3] [OLE32.131]
97 void WINAPI
OleUninitialize(void)
102 * Decrease the lock count on the OLE module.
104 s_OLEModuleLockCount
--;
107 * If we hit the bottom of the lock stack, free the libraries.
109 if (s_OLEModuleLockCount
==0)
112 * Actually free the libraries.
114 TRACE(ole
, "() - Freeing the last reference count\n");
118 * Then, uninitialize the COM libraries.
123 /***********************************************************************
124 * OleFlushClipboard [OLE2.76]
126 HRESULT WINAPI
OleFlushClipboard(void)
131 /***********************************************************************
132 * OleSetClipboard [OLE32.127]
134 HRESULT WINAPI
OleSetClipboard(LPVOID pDataObj
)
136 FIXME(ole
,"(%p), stub!\n", pDataObj
);
140 /******************************************************************************
141 * CoRegisterMessageFilter32 [OLE32.38]
143 HRESULT WINAPI
CoRegisterMessageFilter32(
144 LPMESSAGEFILTER lpMessageFilter
, /* Pointer to interface */
145 LPMESSAGEFILTER
*lplpMessageFilter
/* Indirect pointer to prior instance if non-NULL */
148 if (lplpMessageFilter
) {
149 *lplpMessageFilter
= NULL
;
154 /******************************************************************************
155 * OleInitializeWOW [OLE32.109]
157 HRESULT WINAPI
OleInitializeWOW(DWORD x
) {
158 FIXME(ole
,"(0x%08lx),stub!\n",x
);
162 /***********************************************************************
163 * RegisterDragDrop16 (OLE2.35)
165 HRESULT WINAPI
RegisterDragDrop16(
167 LPDROPTARGET pDropTarget
169 FIXME(ole
,"(0x%04x,%p),stub!\n",hwnd
,pDropTarget
);
173 /***********************************************************************
174 * RegisterDragDrop32 (OLE32.139)
176 HRESULT WINAPI
RegisterDragDrop32(
178 LPDROPTARGET pDropTarget
180 FIXME(ole
,"(0x%04x,%p),stub!\n",hwnd
,pDropTarget
);
184 /***********************************************************************
185 * RevokeDragDrop16 (OLE2.36)
187 HRESULT WINAPI
RevokeDragDrop16(
190 FIXME(ole
,"(0x%04x),stub!\n",hwnd
);
194 /***********************************************************************
195 * RevokeDragDrop32 (OLE32.141)
197 HRESULT WINAPI
RevokeDragDrop32(
200 FIXME(ole
,"(0x%04x),stub!\n",hwnd
);
204 /***********************************************************************
205 * OleRegGetUserType (OLE32.122)
207 HRESULT WINAPI
OleRegGetUserType32(
210 LPOLESTR32
* pszUserType
)
212 FIXME(ole
,",stub!\n");
216 /***********************************************************************
217 * DoDragDrop32 [OLE32.65]
219 HRESULT WINAPI
DoDragDrop32 (
220 IDataObject
*pDataObject
, /* ptr to the data obj */
221 IDataObject
*pDropSource
, /* ptr to the source obj */
222 DWORD dwOKEffect
, /* effects allowed by the source */
223 DWORD
*pdwEffect
) /* ptr to effects of the source */
225 FIXME(ole
,"(DataObject %p, DropSource %p): stub!\n", pDataObject
, pDropSource
);
226 return DRAGDROP_S_DROP
;