4c4287f319ec68bf5f0433471e9fc8bfc1653ebf
[reactos.git] / reactos / dll / win32 / ole32 / ifs.h
1 /*
2 * Copyright 1997 Marcus Meissner
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19 #ifndef __WINE_OLE_IFS_H
20 #define __WINE_OLE_IFS_H
21
22 #include <stdarg.h>
23
24 #include "windef.h"
25 #include "winbase.h"
26 #include "objbase.h"
27
28 typedef CHAR OLECHAR16;
29 typedef LPSTR LPOLESTR16;
30 typedef LPCSTR LPCOLESTR16;
31
32 #define STDMETHOD16CALLTYPE __cdecl
33 #define STDMETHOD16(m) HRESULT (STDMETHOD16CALLTYPE *m)
34 #define STDMETHOD16_(t,m) t (STDMETHOD16CALLTYPE *m)
35
36
37 /***********************************************************************
38 * IMalloc16 interface
39 */
40
41 typedef struct IMalloc16 *LPMALLOC16;
42
43 #define INTERFACE IMalloc16
44 DECLARE_INTERFACE_(IMalloc16,IUnknown)
45 {
46 /*** IUnknown methods ***/
47 STDMETHOD16_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
48 STDMETHOD16_(ULONG,AddRef)(THIS) PURE;
49 STDMETHOD16_(ULONG,Release)(THIS) PURE;
50 /*** IMalloc16 methods ***/
51 STDMETHOD16_(LPVOID,Alloc)(THIS_ DWORD cb) PURE;
52 STDMETHOD16_(LPVOID,Realloc)(THIS_ LPVOID pv, DWORD cb) PURE;
53 STDMETHOD16_(void,Free)(THIS_ LPVOID pv) PURE;
54 STDMETHOD16_(DWORD,GetSize)(THIS_ LPVOID pv) PURE;
55 STDMETHOD16_(INT16,DidAlloc)(THIS_ LPVOID pv) PURE;
56 STDMETHOD16_(LPVOID,HeapMinimize)(THIS) PURE;
57 };
58 #undef INTERFACE
59
60 /**********************************************************************/
61
62 typedef struct ILockBytes16 *LPLOCKBYTES16;
63
64 #define INTERFACE ILockBytes16
65 DECLARE_INTERFACE_(ILockBytes16,IUnknown)
66 {
67 /*** IUnknown methods ***/
68 STDMETHOD16_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
69 STDMETHOD16_(ULONG,AddRef)(THIS) PURE;
70 STDMETHOD16_(ULONG,Release)(THIS) PURE;
71 /*** ILockBytes16 methods ***/
72 STDMETHOD16(ReadAt)(THIS_ ULARGE_INTEGER ulOffset, void *pv, ULONG cb, ULONG *pcbRead) PURE;
73 STDMETHOD16(WriteAt)(THIS_ ULARGE_INTEGER ulOffset, const void *pv, ULONG cb, ULONG *pcbWritten) PURE;
74 STDMETHOD16(Flush)(THIS) PURE;
75 STDMETHOD16(SetSize)(THIS_ ULARGE_INTEGER cb) PURE;
76 STDMETHOD16(LockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE;
77 STDMETHOD16(UnlockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE;
78 STDMETHOD16(Stat)(THIS_ STATSTG *pstatstg, DWORD grfStatFlag) PURE;
79 };
80 #undef INTERFACE
81
82 /**********************************************************************/
83
84 typedef struct tagSTATSTG16
85 {
86 LPOLESTR16 pwcsName;
87 DWORD type;
88 ULARGE_INTEGER cbSize;
89 FILETIME mtime;
90 FILETIME ctime;
91 FILETIME atime;
92 DWORD grfMode;
93 DWORD grfLocksSupported;
94 CLSID clsid;
95 DWORD grfStateBits;
96 DWORD reserved;
97 } STATSTG16;
98
99 typedef struct IStream16 *LPSTREAM16;
100
101 #define INTERFACE IStream16
102 DECLARE_INTERFACE_(IStream16,ISequentialStream)
103 {
104 /*** IUnknown methods ***/
105 STDMETHOD16_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
106 STDMETHOD16_(ULONG,AddRef)(THIS) PURE;
107 STDMETHOD16_(ULONG,Release)(THIS) PURE;
108 /*** ISequentialStream methods ***/
109 STDMETHOD16_(HRESULT,Read)(THIS_ void* pv, ULONG cb, ULONG* pcbRead) PURE;
110 STDMETHOD16_(HRESULT,Write)(THIS_ const void* pv, ULONG cb, ULONG* pcbWritten) PURE;
111 /*** IStream16 methods ***/
112 STDMETHOD16(Seek)(THIS_ LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER* plibNewPosition) PURE;
113 STDMETHOD16(SetSize)(THIS_ ULARGE_INTEGER libNewSize) PURE;
114 STDMETHOD16(CopyTo)(THIS_ IStream16* pstm, ULARGE_INTEGER cb, ULARGE_INTEGER* pcbRead, ULARGE_INTEGER* pcbWritten) PURE;
115 STDMETHOD16(Commit)(THIS_ DWORD grfCommitFlags) PURE;
116 STDMETHOD16(Revert)(THIS) PURE;
117 STDMETHOD16(LockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE;
118 STDMETHOD16(UnlockRegion)(THIS_ ULARGE_INTEGER libOffset, ULARGE_INTEGER cb, DWORD dwLockType) PURE;
119 STDMETHOD16(Stat)(THIS_ STATSTG* pstatstg, DWORD grfStatFlag) PURE;
120 STDMETHOD16(Clone)(THIS_ IStream16** ppstm) PURE;
121 };
122 #undef INTERFACE
123
124 /**********************************************************************/
125
126 typedef OLECHAR16 **SNB16;
127
128 typedef struct IStorage16 *LPSTORAGE16;
129
130 #define INTERFACE IStorage16
131 DECLARE_INTERFACE_(IStorage16,IUnknown)
132 {
133 /*** IUnknown methods ***/
134 STDMETHOD16_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
135 STDMETHOD16_(ULONG,AddRef)(THIS) PURE;
136 STDMETHOD16_(ULONG,Release)(THIS) PURE;
137 /*** IStorage16 methods ***/
138 STDMETHOD16_(HRESULT,CreateStream)(THIS_ LPCOLESTR16 pwcsName, DWORD grfMode, DWORD reserved1, DWORD reserved2, IStream16** ppstm) PURE;
139 STDMETHOD16_(HRESULT,OpenStream)(THIS_ LPCOLESTR16 pwcsName, void* reserved1, DWORD grfMode, DWORD reserved2, IStream16** ppstm) PURE;
140 STDMETHOD16_(HRESULT,CreateStorage)(THIS_ LPCOLESTR16 pwcsName, DWORD grfMode, DWORD dwStgFmt, DWORD reserved2, IStorage16** ppstg) PURE;
141 STDMETHOD16_(HRESULT,OpenStorage)(THIS_ LPCOLESTR16 pwcsName, IStorage16* pstgPriority, DWORD grfMode, SNB16 snbExclude, DWORD reserved, IStorage16** ppstg) PURE;
142 STDMETHOD16_(HRESULT,CopyTo)(THIS_ DWORD ciidExclude, const IID* rgiidExclude, SNB16 snbExclude, IStorage16* pstgDest) PURE;
143 STDMETHOD16_(HRESULT,MoveElementTo)(THIS_ LPCOLESTR16 pwcsName, IStorage16* pstgDest, LPCOLESTR16 pwcsNewName, DWORD grfFlags) PURE;
144 STDMETHOD16_(HRESULT,Commit)(THIS_ DWORD grfCommitFlags) PURE;
145 STDMETHOD16_(HRESULT,Revert)(THIS) PURE;
146 STDMETHOD16_(HRESULT,EnumElements)(THIS_ DWORD reserved1, void* reserved2, DWORD reserved3, IEnumSTATSTG** ppenum) PURE;
147 STDMETHOD16_(HRESULT,DestroyElement)(THIS_ LPCOLESTR16 pwcsName) PURE;
148 STDMETHOD16_(HRESULT,RenameElement)(THIS_ LPCOLESTR16 pwcsOldName, LPCOLESTR16 pwcsNewName) PURE;
149 STDMETHOD16_(HRESULT,SetElementTimes)(THIS_ LPCOLESTR16 pwcsName, const FILETIME* pctime, const FILETIME* patime, const FILETIME* pmtime) PURE;
150 STDMETHOD16_(HRESULT,SetClass)(THIS_ REFCLSID clsid) PURE;
151 STDMETHOD16_(HRESULT,SetStateBits)(THIS_ DWORD grfStateBits, DWORD grfMask) PURE;
152 STDMETHOD16_(HRESULT,Stat)(THIS_ STATSTG* pstatstg, DWORD grfStatFlag) PURE;
153 };
154 #undef INTERFACE
155
156 #endif /* __WINE_OLE_IFS_H */