1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms.
6 use ctypes
::{__int64, c_double, c_short, c_ushort, c_void, wchar_t}
;
7 use shared
::guiddef
::{CLSID, GUID}
;
8 use shared
::minwindef
::{BYTE, DWORD, ULONG, USHORT, WORD}
;
9 use shared
::ntdef
::{LCID, LONG, LONGLONG, ULONGLONG}
;
10 use shared
::rpcndr
::byte
;
11 use shared
::wtypesbase
::{
12 BYTE_BLOB
, DWORD_BLOB
, FLAGGED_BYTE_BLOB
, FLAGGED_WORD_BLOB
, LPOLESTR
, OLECHAR
14 use um
::wingdi
::LOGPALETTE
;
15 // extern RPC_IF_HANDLE __MIDL_itf_wtypes_0000_0000_v0_0_c_ifspec;
16 // extern RPC_IF_HANDLE __MIDL_itf_wtypes_0000_0000_v0_0_s_ifspec;
17 STRUCT
!{struct RemHGLOBAL
{
22 STRUCT
!{struct RemHMETAFILEPICT
{
29 STRUCT
!{struct RemHENHMETAFILE
{
33 STRUCT
!{struct RemHBITMAP
{
37 STRUCT
!{struct RemHPALETTE
{
41 STRUCT
!{struct RemHBRUSH
{
45 pub const ROTFLAGS_REGISTRATIONKEEPSALIVE
: DWORD
= 0x1;
46 pub const ROTFLAGS_ALLOWANYCLIENT
: DWORD
= 0x2;
47 pub const ROT_COMPARE_MAX
: DWORD
= 2048;
50 DVASPECT_THUMBNAIL
= 2,
52 DVASPECT_DOCPRINT
= 8,
57 STGC_ONLYIFCURRENT
= 2,
58 STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE
= 4,
64 STGMOVE_SHALLOWCOPY
= 2,
71 pub type HCONTEXT
= *mut c_void
;
72 pub const WDT_INPROC_CALL
: ULONG
= 0x48746457;
73 pub const WDT_REMOTE_CALL
: ULONG
= 0x52746457;
74 pub const WDT_INPROC64_CALL
: ULONG
= 0x50746457;
75 UNION
!{union userCLIPFORMAT_u
{
77 dwValue dwValue_mut
: DWORD
,
78 pwszName pwszName_mut
: *mut wchar_t
,
80 STRUCT
!{struct userCLIPFORMAT
{
84 pub type wireCLIPFORMAT
= *mut userCLIPFORMAT
;
85 pub type CLIPFORMAT
= WORD
;
86 UNION
!{union GDI_NONREMOTE_u
{
88 hInproc hInproc_mut
: LONG
,
89 hRemote hRemote_mut
: *mut DWORD_BLOB
,
91 STRUCT
!{struct GDI_NONREMOTE
{
95 UNION
!{union userHGLOBAL_u
{
97 hInproc hInproc_mut
: LONG
,
98 hRemote hRemote_mut
: *mut FLAGGED_BYTE_BLOB
,
99 hInproc64 hInproc64_mut
: __int64
,
101 STRUCT
!{struct userHGLOBAL
{
105 pub type wireHGLOBAL
= *mut userHGLOBAL
;
106 UNION
!{union userHMETAFILE_u
{
108 hInproc hInproc_mut
: LONG
,
109 hRemote hRemote_mut
: *mut BYTE_BLOB
,
110 hInproc64 hInproc64_mut
: __int64
,
112 STRUCT
!{struct userHMETAFILE
{
116 STRUCT
!{struct remoteMETAFILEPICT
{
120 hMF
: *mut userHMETAFILE
,
122 UNION
!{union userHMETAFILEPICT_u
{
124 hInproc hInproc_mut
: LONG
,
125 hRemote hRemote_mut
: *mut remoteMETAFILEPICT
,
126 hInproc64 hInproc64_mut
: __int64
,
128 STRUCT
!{struct userHMETAFILEPICT
{
130 u
: userHMETAFILEPICT_u
,
132 UNION
!{union userHENHMETAFILE_u
{
134 hInproc hInproc_mut
: LONG
,
135 hRemote hRemote_mut
: *mut BYTE_BLOB
,
136 hInproc64 hInproc64_mut
: __int64
,
138 STRUCT
!{struct userHENHMETAFILE
{
140 u
: userHENHMETAFILE_u
,
142 STRUCT
!{struct userBITMAP
{
152 UNION
!{union userHBITMAP_u
{
154 hInproc hInproc_mut
: LONG
,
155 hRemote hRemote_mut
: *mut userBITMAP
,
156 hInproc64 hInproc64_mut
: __int64
,
158 STRUCT
!{struct userHBITMAP
{
162 UNION
!{union userHPALETTE_u
{
164 hInproc hInproc_mut
: LONG
,
165 hRemote hRemote_mut
: *mut LOGPALETTE
,
166 hInproc64 hInproc64_mut
: __int64
,
168 STRUCT
!{struct userHPALETTE
{
172 UNION
!{union RemotableHandle_u
{
174 hInproc hInproc_mut
: LONG
,
175 hRemote hRemote_mut
: LONG
,
177 STRUCT
!{struct RemotableHandle
{
179 u
: RemotableHandle_u
,
181 pub type wireHWND
= *mut RemotableHandle
;
182 pub type wireHMENU
= *mut RemotableHandle
;
183 pub type wireHACCEL
= *mut RemotableHandle
;
184 pub type wireHBRUSH
= *mut RemotableHandle
;
185 pub type wireHFONT
= *mut RemotableHandle
;
186 pub type wireHDC
= *mut RemotableHandle
;
187 pub type wireHICON
= *mut RemotableHandle
;
188 pub type wireHRGN
= *mut RemotableHandle
;
189 pub type wireHMONITOR
= *mut RemotableHandle
;
190 pub type wireHBITMAP
= *mut userHBITMAP
;
191 pub type wireHPALETTE
= *mut userHPALETTE
;
192 pub type wireHENHMETAFILE
= *mut userHENHMETAFILE
;
193 pub type wireHMETAFILE
= *mut userHMETAFILE
;
194 pub type wireHMETAFILEPICT
= *mut userHMETAFILEPICT
;
195 pub type HMETAFILEPICT
= *mut c_void
;
196 // extern RPC_IF_HANDLE IWinTypes_v0_1_c_ifspec;
197 // extern RPC_IF_HANDLE IWinTypes_v0_1_s_ifspec;
198 pub type DATE
= c_double
;
202 pub type LPCY
= *mut CY
;
203 STRUCT
!{struct DECIMAL
{
210 pub const DECIMAL_NEG
: BYTE
= 0x80;
212 pub fn DECIMAL_SETZERO(dec
: &mut DECIMAL
) {
218 pub type LPDECIMAL
= *mut DECIMAL
;
219 pub type wireBSTR
= *mut FLAGGED_WORD_BLOB
;
220 pub type BSTR
= *mut OLECHAR
;
221 pub type LPBSTR
= *mut BSTR
;
222 pub type VARIANT_BOOL
= c_short
;
223 STRUCT
!{struct BSTRBLOB
{
227 pub type LPBSTRBLOB
= *mut BSTRBLOB
;
228 pub const VARIANT_TRUE
: VARIANT_BOOL
= -1;
229 pub const VARIANT_FALSE
: VARIANT_BOOL
= 0;
230 STRUCT
!{struct CLIPDATA
{
233 pClipData
: *mut BYTE
,
236 pub fn CBPCLIPDATA(clipdata
: CLIPDATA
) -> ULONG
{
239 pub type VARTYPE
= c_ushort
;
279 VT_STREAMED_OBJECT
= 68,
280 VT_STORED_OBJECT
= 69,
284 VT_VERSIONED_STREAM
= 73,
285 VT_BSTR_BLOB
= 0xfff,
289 VT_RESERVED
= 0x8000,
291 VT_ILLEGALMASKED
= 0xfff,
294 pub type PROPID
= ULONG
;
295 STRUCT
!{struct PROPERTYKEY
{
299 STRUCT
!{struct CSPLATFORM
{
303 dwProcessorArch
: DWORD
,
305 STRUCT
!{struct QUERYCONTEXT
{
307 Platform
: CSPLATFORM
,
321 STRUCT
!{struct uCLSSPEC_ByName
{
322 pPackageName
: LPOLESTR
,
325 STRUCT
!{struct uCLSSPEC_ByObjectId
{
329 UNION
!{union uCLSSPEC_u
{
331 clsid clsid_mut
: CLSID
,
332 pFileExt pFileExt_mut
: LPOLESTR
,
333 pMimeType pMimeType_mut
: LPOLESTR
,
334 pProgId pProgId_mut
: LPOLESTR
,
335 pFileName pFileName_mut
: LPOLESTR
,
336 ByName ByName_mut
: uCLSSPEC_ByName
,
337 ByObjectId ByObjectId_mut
: uCLSSPEC_ByObjectId
,
339 STRUCT
!{struct uCLSSPEC
{
343 // extern RPC_IF_HANDLE __MIDL_itf_wtypes_0000_0001_v0_0_c_ifspec;
344 // extern RPC_IF_HANDLE __MIDL_itf_wtypes_0000_0001_v0_0_s_ifspec;