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 // TODO:It is a minimal implementation. 7 use shared::guiddef::CLSID; 8 use shared::minwindef::{DWORD, ULONG}; 9 use shared::ntdef::HRESULT; 10 use shared::wtypes::{CLIPFORMAT, VARTYPE}; 11 use shared::wtypesbase::{LPCOLESTR, LPOLESTR}; 12 use um::oaidl::{IErrorLog, VARIANT}; 13 use um::unknwnbase::{IUnknown, IUnknownVtbl}; 14 ENUM!{enum READYSTATE { 15 READYSTATE_UNINITIALIZED = 0, 16 READYSTATE_LOADING = 1, 17 READYSTATE_LOADED = 2, 18 READYSTATE_INTERACTIVE = 3, 19 READYSTATE_COMPLETE = 4, 20 }} 21 ENUM!{enum PROPBAG2_TYPE { 22 PROPBAG2_TYPE_UNDEFINED = 0, 23 PROPBAG2_TYPE_DATA = 1, 24 PROPBAG2_TYPE_URL = 2, 25 PROPBAG2_TYPE_OBJECT = 3, 26 PROPBAG2_TYPE_STREAM = 4, 27 PROPBAG2_TYPE_STORAGE = 5, 28 PROPBAG2_TYPE_MONIKER = 6, 29 }} 30 STRUCT!{struct PROPBAG2 { 31 dwType: DWORD, 32 vt: VARTYPE, 33 cfType: CLIPFORMAT, 34 dwHint: DWORD, 35 pstrName: LPOLESTR, 36 clsid: CLSID, 37 }} 38 RIDL!{#[uuid(0x22f55882, 0x280b, 0x11d0, 0xa8, 0xa9, 0x00, 0xa0, 0xc9, 0x0c, 0x20, 0x04)] 39 interface IPropertyBag2(IPropertyBag2Vtbl): IUnknown(IUnknownVtbl) { 40 fn Read( 41 cProperties: ULONG, 42 pPropBag: *const PROPBAG2, 43 pErrLog: *const IErrorLog, 44 pvarValue: *mut VARIANT, 45 phrError: *mut HRESULT, 46 ) -> HRESULT, 47 fn Write( 48 cProperties: ULONG, 49 pPropBag: *const PROPBAG2, 50 pvarValue: *const VARIANT, 51 ) -> HRESULT, 52 fn CountProperties( 53 pcProperties: *mut ULONG, 54 ) -> HRESULT, 55 fn GetPropertyInfo( 56 iProperty: ULONG, 57 cProperties: ULONG, 58 pPropBag: *mut PROPBAG2, 59 pcProperties: *mut ULONG, 60 ) -> HRESULT, 61 fn LoadObject( 62 pstrName: LPCOLESTR, 63 dwHint: DWORD, 64 pUnkObject: *const IUnknown, 65 pErrLog: *const IErrorLog, 66 ) -> HRESULT, 67 }} 68 pub type LPPROPERTYBAG2 = *mut IPropertyBag2; 69