]>
Commit | Line | Data |
---|---|---|
ff7c6d11 XL |
1 | // Copyright © 2017 winapi-rs developers |
2 | // Licensed under the Apache License, Version 2.0 | |
3 | // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
4 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. | |
5 | // All files in the project carrying such notice may not be copied, modified, or distributed | |
6 | // except according to those terms. | |
7 | // TODO:It is a minimal implementation. | |
8 | use shared::guiddef::CLSID; | |
9 | use shared::minwindef::{DWORD, ULONG}; | |
10 | use shared::ntdef::HRESULT; | |
11 | use shared::wtypes::{CLIPFORMAT, VARTYPE}; | |
12 | use shared::wtypesbase::{LPCOLESTR, LPOLESTR}; | |
13 | use um::oaidl::{IErrorLog, VARIANT}; | |
14 | use um::unknwnbase::{IUnknown, IUnknownVtbl}; | |
0bf4aa26 XL |
15 | ENUM!{enum READYSTATE { |
16 | READYSTATE_UNINITIALIZED = 0, | |
17 | READYSTATE_LOADING = 1, | |
18 | READYSTATE_LOADED = 2, | |
19 | READYSTATE_INTERACTIVE = 3, | |
20 | READYSTATE_COMPLETE = 4, | |
21 | }} | |
ff7c6d11 XL |
22 | ENUM!{enum PROPBAG2_TYPE { |
23 | PROPBAG2_TYPE_UNDEFINED = 0, | |
24 | PROPBAG2_TYPE_DATA = 1, | |
25 | PROPBAG2_TYPE_URL = 2, | |
26 | PROPBAG2_TYPE_OBJECT = 3, | |
27 | PROPBAG2_TYPE_STREAM = 4, | |
28 | PROPBAG2_TYPE_STORAGE = 5, | |
29 | PROPBAG2_TYPE_MONIKER = 6, | |
30 | }} | |
31 | STRUCT!{struct PROPBAG2 { | |
32 | dwType: DWORD, | |
33 | vt: VARTYPE, | |
34 | cfType: CLIPFORMAT, | |
35 | dwHint: DWORD, | |
36 | pstrName: LPOLESTR, | |
37 | clsid: CLSID, | |
38 | }} | |
0bf4aa26 | 39 | RIDL!{#[uuid(0x22f55882, 0x280b, 0x11d0, 0xa8, 0xa9, 0x00, 0xa0, 0xc9, 0x0c, 0x20, 0x04)] |
ff7c6d11 XL |
40 | interface IPropertyBag2(IPropertyBag2Vtbl): IUnknown(IUnknownVtbl) { |
41 | fn Read( | |
42 | cProperties: ULONG, | |
43 | pPropBag: *const PROPBAG2, | |
44 | pErrLog: *const IErrorLog, | |
45 | pvarValue: *mut VARIANT, | |
46 | phrError: *mut HRESULT, | |
47 | ) -> HRESULT, | |
48 | fn Write( | |
49 | cProperties: ULONG, | |
50 | pPropBag: *const PROPBAG2, | |
51 | pvarValue: *const VARIANT, | |
52 | ) -> HRESULT, | |
53 | fn CountProperties( | |
54 | pcProperties: *mut ULONG, | |
55 | ) -> HRESULT, | |
56 | fn GetPropertyInfo( | |
57 | iProperty: ULONG, | |
58 | cProperties: ULONG, | |
59 | pPropBag: *mut PROPBAG2, | |
60 | pcProperties: *mut ULONG, | |
61 | ) -> HRESULT, | |
62 | fn LoadObject( | |
63 | pstrName: LPCOLESTR, | |
64 | dwHint: DWORD, | |
65 | pUnkObject: *const IUnknown, | |
66 | pErrLog: *const IErrorLog, | |
67 | ) -> HRESULT, | |
0bf4aa26 | 68 | }} |
ff7c6d11 | 69 | pub type LPPROPERTYBAG2 = *mut IPropertyBag2; |