Fixed several bugs and typos.
[wine] / ole / ole2.c
1 /*
2  *      OLE2 library
3  *
4  *      Copyright 1995  Martin von Loewis
5  */
6
7 #include "windows.h"
8 #include "winerror.h"
9 #include "ole2.h"
10 #include "process.h"
11 #include "debug.h"
12 #include "objidl.h"
13 #include "wine/obj_base.h"
14 #include "wine/obj_clientserver.h"
15 #include "wine/obj_storage.h"
16 #include "wine/obj_moniker.h"
17
18 /******************************************************************************
19  *              OleBuildVersion [OLE2.1]
20  */
21 DWORD WINAPI OleBuildVersion(void)
22 {
23     TRACE(ole,"(void)\n");
24     return (rmm<<16)+rup;
25 }
26
27 /***********************************************************************
28  *           OleInitialize       (OLE2.2) (OLE32.108)
29  */
30 HRESULT WINAPI OleInitialize(LPVOID reserved)
31 {
32     FIXME(ole,"OleInitialize - stub\n");
33     return S_OK;
34 }
35
36 /******************************************************************************
37  *              CoGetCurrentProcess     [COMPOBJ.34] [OLE2.2][OLE32.108]
38  *
39  * NOTES
40  *   Is DWORD really the correct return type for this function?
41  */
42 DWORD WINAPI CoGetCurrentProcess(void) {
43         return (DWORD)PROCESS_Current();
44 }
45
46 /******************************************************************************
47  *              OleUninitialize [OLE2.3] [OLE32.131]
48  */
49 void WINAPI OleUninitialize(void)
50 {
51     FIXME(ole,"stub\n");
52 }
53
54 /***********************************************************************
55  *           OleFlushClipboard   [OLE2.76]
56  */
57 HRESULT WINAPI OleFlushClipboard(void)
58 {
59     return S_OK;
60 }
61
62 /***********************************************************************
63  *           OleSetClipboard     [OLE32.127]
64  */
65 HRESULT WINAPI OleSetClipboard(LPVOID pDataObj)
66 {
67     FIXME(ole,"(%p), stub!\n", pDataObj);
68     return S_OK;
69 }
70
71 /******************************************************************************
72  *              CoRegisterMessageFilter32       [OLE32.38]
73  */
74 HRESULT WINAPI CoRegisterMessageFilter32(
75     LPMESSAGEFILTER lpMessageFilter,    /* Pointer to interface */
76     LPMESSAGEFILTER *lplpMessageFilter  /* Indirect pointer to prior instance if non-NULL */
77 ) {
78     FIXME(ole,"stub\n");
79     if (lplpMessageFilter) {
80         *lplpMessageFilter = NULL;
81     }
82     return S_OK;
83 }
84
85 /******************************************************************************
86  *              OleInitializeWOW        [OLE32.109]
87  */
88 HRESULT WINAPI OleInitializeWOW(DWORD x) {
89         FIXME(ole,"(0x%08lx),stub!\n",x);
90         return 0;
91 }
92
93 /******************************************************************************
94  *              GetRunningObjectTable16 [OLE2.30]
95  */
96 HRESULT WINAPI GetRunningObjectTable16(DWORD reserved, LPVOID *pprot) {
97         FIXME(ole,"(%ld,%p),stub!\n",reserved,pprot);
98         return E_FAIL;
99 }
100
101
102 /***********************************************************************
103  *           GetRunningObjectTable32 (OLE2.73)
104  */
105 HRESULT WINAPI GetRunningObjectTable32(DWORD reserved, LPVOID *pprot) {
106         FIXME(ole,"(%ld,%p),stub!\n",reserved,pprot);
107         return E_FAIL;
108 }
109
110 /***********************************************************************
111  *           RegisterDragDrop16 (OLE2.35)
112  */
113 HRESULT WINAPI RegisterDragDrop16(
114         HWND16 hwnd,
115         LPDROPTARGET pDropTarget
116 ) {
117         FIXME(ole,"(0x%04x,%p),stub!\n",hwnd,pDropTarget);
118         return S_OK;
119 }
120
121 /***********************************************************************
122  *           RegisterDragDrop32 (OLE32.139)
123  */
124 HRESULT WINAPI RegisterDragDrop32(
125         HWND32 hwnd,
126         LPDROPTARGET pDropTarget
127 ) {
128         FIXME(ole,"(0x%04x,%p),stub!\n",hwnd,pDropTarget);
129         return S_OK;
130 }
131
132 /***********************************************************************
133  *           RevokeDragDrop16 (OLE2.36)
134  */
135 HRESULT WINAPI RevokeDragDrop16(
136         HWND16 hwnd
137 ) {
138         FIXME(ole,"(0x%04x),stub!\n",hwnd);
139         return S_OK;
140 }
141
142 /***********************************************************************
143  *           RevokeDragDrop32 (OLE32.141)
144  */
145 HRESULT WINAPI RevokeDragDrop32(
146         HWND32 hwnd
147 ) {
148         FIXME(ole,"(0x%04x),stub!\n",hwnd);
149         return S_OK;
150 }
151
152 /***********************************************************************
153  *           OleRegGetUserType (OLE32.122)
154  */
155 HRESULT WINAPI OleRegGetUserType32( 
156         REFCLSID clsid, 
157         DWORD dwFormOfType,
158         LPOLESTR32* pszUserType)
159 {
160         FIXME(ole,",stub!\n");
161         return S_OK;
162 }
163
164 /***********************************************************************
165  * CreateBindCtx32 [OLE32.52]
166  */
167 HRESULT WINAPI CreateBindCtx32 (DWORD reserved, LPVOID *ppbc)
168 {
169     FIXME(ole,"(0x%08lx %p): stub!\n", reserved, ppbc);
170     *ppbc = 0;
171 /*    return S_OK; */
172     return E_OUTOFMEMORY;
173 }
174
175 /***********************************************************************
176  * DoDragDrop32 [OLE32.65]
177  */
178 HRESULT WINAPI DoDragDrop32 (
179   IDataObject *pDataObject,  /* ptr to the data obj           */
180   IDataObject *pDropSource,  /* ptr to the source obj         */
181   DWORD       dwOKEffect,    /* effects allowed by the source */
182   DWORD       *pdwEffect)    /* ptr to effects of the source  */
183 {
184   FIXME(ole,"(DataObject %p, DropSource %p): stub!\n", pDataObject, pDropSource);
185   return DRAGDROP_S_DROP;
186 }
187