Exemplo n.º 1
0
    public bool MoveNext()
    {
        int rgelt;
        int pceltFetched;

        if (this.m_IEnumItem.Next(1, out rgelt, out pceltFetched) != 0)
        {
            return(false);
        }
        if (rgelt != 0)
        {
            this.m_Current = new CItem();
            CItem   citem  = this.m_Current;
            IPStore PStore = this.m_IPStore;
            int     num    = (int)this.m_KeyType;
            // ISSUE: explicit reference operation
            // ISSUE: variable of a reference type
            Guid& guidType = @this.m_TypeGuid;
            // ISSUE: explicit reference operation
            // ISSUE: variable of a reference type
            Guid&  guidSubType = @this.m_SubTypeGuid;
            IntPtr ptr         = new IntPtr(rgelt);
            string szItemName  = this.CopyString(ptr);
            citem.Init(PStore, (PST_KEY)num, guidType, guidSubType, szItemName);
            ptr = new IntPtr(rgelt);
            Marshal.FreeCoTaskMem(ptr);
        }
        return(true);
    }
Exemplo n.º 2
0
 internal void Init(IPStore PStore, PST_KEY KeyType, ref Guid guidType)
 {
     this.m_IPStore   = PStore;
     this.m_KeyType   = KeyType;
     this.m_TypeGuid  = guidType;
     this.m_IEnumType = PStore.EnumSubtypes(KeyType, ref guidType, 0);
 }
Exemplo n.º 3
0
        // Token: 0x060001A1 RID: 417 RVA: 0x00006138 File Offset: 0x00004338
        public bool MoveNext()
        {
            bool result;

            if (this.m_IEnumItem == null)
            {
                result = false;
            }
            else
            {
                int num2;
                int num3;
                int num = this.m_IEnumItem.Next(1, ref num2, ref num3);
                if (num != 0)
                {
                    result = false;
                }
                else
                {
                    if (num2 != 0)
                    {
                        this.m_Current = new CItem();
                        CItem   current = this.m_Current;
                        IPStore ipstore = this.m_IPStore;
                        PST_KEY keyType = this.m_KeyType;
                        IntPtr  ptr     = new IntPtr(num2);
                        current.Init(ipstore, keyType, ref this.m_TypeGuid, ref this.m_SubTypeGuid, this.CopyString(ptr));
                        ptr = new IntPtr(num2);
                        Marshal.FreeCoTaskMem(ptr);
                    }
                    result = true;
                }
            }
            return(result);
        }
Exemplo n.º 4
0
 // Token: 0x06000193 RID: 403 RVA: 0x00005CE0 File Offset: 0x00003EE0
 internal void Init(IPStore PStore, PST_KEY KeyType, ref Guid guidType, ref Guid guidSubType, string szItemName)
 {
     this.m_IPStore = PStore;
     this.m_Guid    = guidType;
     this.m_SubGuid = guidSubType;
     this.m_Name    = szItemName;
     this.m_KeyType = KeyType;
 }
Exemplo n.º 5
0
        // Token: 0x060001A6 RID: 422 RVA: 0x000061DC File Offset: 0x000043DC
        private static IPStore GetPStoreInterface()
        {
            IPStore result = null;
            Guid    ms_BASE_PSTPROVIDER_SZID = guidProvider.MS_BASE_PSTPROVIDER_SZID;

            CProtectStore.PStoreCreateInstance(ref result, ref ms_BASE_PSTPROVIDER_SZID, 0, 0);
            return(result);
        }
Exemplo n.º 6
0
 internal CItems(IPStore PStore, PST_KEY KeyType, ref Guid guidType, ref Guid guidSubType)
 {
     this.m_TypeGuid    = new Guid();
     this.m_SubTypeGuid = new Guid();
     this.m_IPStore     = PStore;
     this.m_KeyType     = KeyType;
     this.m_TypeGuid    = guidType;
     this.m_SubTypeGuid = guidSubType;
     this.m_IEnumItem   = PStore.EnumItems(KeyType, ref guidType, ref guidSubType, 0);
 }
Exemplo n.º 7
0
 // Token: 0x06000198 RID: 408 RVA: 0x00005E14 File Offset: 0x00004014
 internal CItems(IPStore PStore, PST_KEY KeyType, ref Guid guidType, ref Guid guidSubType)
 {
     this.m_TypeGuid    = default(Guid);
     this.m_SubTypeGuid = default(Guid);
     if (PStore != null)
     {
         this.m_IPStore     = PStore;
         this.m_KeyType     = KeyType;
         this.m_TypeGuid    = guidType;
         this.m_SubTypeGuid = guidSubType;
         this.m_IEnumItem   = PStore.EnumItems(KeyType, ref guidType, ref guidSubType, 0);
     }
 }
Exemplo n.º 8
0
    private static IPStore GetPStoreInterface()
    {
        IPStore pstore = (IPStore)null;
        // ISSUE: explicit reference operation
        // ISSUE: variable of a reference type
        IPStore& ppProvider = @pstore;
        Guid     guid       = guidProvider.MS_BASE_PSTPROVIDER_SZID;
        // ISSUE: explicit reference operation
        // ISSUE: variable of a reference type
        Guid& pProviderID = @guid;
        int   pReserved   = 0;
        int   dwFlags     = 0;

        CProtectStore.PStoreCreateInstance(ppProvider, pProviderID, pReserved, dwFlags);
        return(pstore);
    }
Exemplo n.º 9
0
    internal void Init(IPStore PStore, PST_KEY KeyType, ref Guid guidType)
    {
        this.m_IPStore = PStore;
        this.m_Guid    = guidType;
        int ppInfo;

        this.m_IPStore.GetTypeInfo(KeyType, ref guidType, out ppInfo, 0);
        if (ppInfo != 0)
        {
            IntPtr       ptr = new IntPtr(ppInfo);
            PST_TYPEINFO pstTypeinfo1;
            object       obj = Marshal.PtrToStructure(ptr, pstTypeinfo1.GetType());
            PST_TYPEINFO pstTypeinfo2;
            this.m_DisplayName = this.CopyString((obj != null ? (PST_TYPEINFO)obj : pstTypeinfo2).szDisplayName);
            ptr = new IntPtr(ppInfo);
            Marshal.FreeCoTaskMem(ptr);
        }
        this.m_SubTypes = new CSubTypes();
        this.m_SubTypes.Init(PStore, KeyType, ref guidType);
    }
Exemplo n.º 10
0
        // Token: 0x060001B3 RID: 435 RVA: 0x00006478 File Offset: 0x00004678
        internal void Init(IPStore PStore, PST_KEY KeyType, ref Guid guidType, ref Guid guidSubType)
        {
            this.m_IPStore = PStore;
            this.m_Guid    = guidType;
            this.m_GuidSub = guidSubType;
            int num;

            this.m_IPStore.GetSubtypeInfo(KeyType, ref guidType, ref guidSubType, ref num, 0);
            if (num > 0)
            {
                IntPtr       ptr = new IntPtr(num);
                PST_TYPEINFO pst_TYPEINFO;
                object       obj = Marshal.PtrToStructure(ptr, pst_TYPEINFO.GetType());
                PST_TYPEINFO pst_TYPEINFO2;
                pst_TYPEINFO       = ((obj != null) ? ((PST_TYPEINFO)obj) : pst_TYPEINFO2);
                this.m_DisplayName = this.CopyString(pst_TYPEINFO.szDisplayName);
                ptr = new IntPtr(num);
                Marshal.FreeCoTaskMem(ptr);
            }
        }
Exemplo n.º 11
0
 internal CTypes(IPStore PStore, PST_KEY KeyType)
 {
     this.m_IPStore   = PStore;
     this.m_KeyType   = KeyType;
     this.m_IEnumType = PStore.EnumTypes(KeyType, 0);
 }
Exemplo n.º 12
0
 private static extern int PStoreCreateInstance(ref IPStore ppProvider, ref Guid pProviderID, int pReserved, int dwFlags);
Exemplo n.º 13
0
 public CProtectStore()
 {
     this.m_PStore  = CProtectStore.GetPStoreInterface();
     this.m_KeyType = PST_KEY.PST_KEY_CURRENT_USER;
 }