Esempio n. 1
0
        public StoreSubcategoryEnumeration EnumSubcategories(Store.EnumSubcategoriesFlags Flags, IDefinitionIdentity Category, string SearchPattern)
        {
            Guid   guidOfType = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_CATEGORY_SUBCATEGORY));
            object obj        = this._pStore.EnumSubcategories((uint)Flags, Category, SearchPattern, ref guidOfType);

            return(new StoreSubcategoryEnumeration((IEnumSTORE_CATEGORY_SUBCATEGORY)obj));
        }
Esempio n. 2
0
        public StoreCategoryInstanceEnumeration EnumCategoryInstances(Store.EnumCategoryInstancesFlags Flags, IDefinitionIdentity Category, string SubCat)
        {
            Guid   guidOfType = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_CATEGORY_INSTANCE));
            object obj        = this._pStore.EnumCategoryInstances((uint)Flags, Category, SubCat, ref guidOfType);

            return(new StoreCategoryInstanceEnumeration((IEnumSTORE_CATEGORY_INSTANCE)obj));
        }
Esempio n. 3
0
        public IEnumSTORE_ASSEMBLY_INSTALLATION_REFERENCE EnumInstallationReferences(Store.EnumAssemblyInstallReferenceFlags Flags, IDefinitionIdentity Assembly)
        {
            Guid   guidOfType = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_ASSEMBLY_INSTALLATION_REFERENCE));
            object obj        = this._pStore.EnumInstallationReferences((uint)Flags, Assembly, ref guidOfType);

            return((IEnumSTORE_ASSEMBLY_INSTALLATION_REFERENCE)obj);
        }
Esempio n. 4
0
        public StoreCategoryEnumeration EnumCategories(Store.EnumCategoriesFlags Flags, IReferenceIdentity CategoryMatch)
        {
            Guid   guidOfType = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_CATEGORY));
            object obj        = this._pStore.EnumCategories((uint)Flags, CategoryMatch, ref guidOfType);

            return(new StoreCategoryEnumeration((IEnumSTORE_CATEGORY)obj));
        }
Esempio n. 5
0
        public StoreAssemblyFileEnumeration EnumPrivateFiles(Store.EnumApplicationPrivateFiles Flags, IDefinitionAppId Application, IDefinitionIdentity Assembly)
        {
            Guid   guidOfType = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_ASSEMBLY_FILE));
            object obj        = this._pStore.EnumPrivateFiles((uint)Flags, Application, Assembly, ref guidOfType);

            return(new StoreAssemblyFileEnumeration((IEnumSTORE_ASSEMBLY_FILE)obj));
        }
Esempio n. 6
0
        public StoreAssemblyEnumeration EnumAssemblies(Store.EnumAssembliesFlags Flags, IReferenceIdentity refToMatch)
        {
            Guid   guidOfType = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_ASSEMBLY));
            object obj        = this._pStore.EnumAssemblies((uint)Flags, refToMatch, ref guidOfType);

            return(new StoreAssemblyEnumeration((IEnumSTORE_ASSEMBLY)obj));
        }
Esempio n. 7
0
 public ApplicationContext(ReferenceAppId appid)
 {
     if (appid == null)
     {
         throw new ArgumentNullException();
     }
     this._appcontext = IsolationInterop.CreateActContext(appid._id);
 }
Esempio n. 8
0
        internal static IActContext CreateActContext(IDefinitionAppId AppId)
        {
            IsolationInterop.CreateActContextParameters createActContextParameters;
            createActContextParameters.Size                      = (uint)Marshal.SizeOf(typeof(IsolationInterop.CreateActContextParameters));
            createActContextParameters.Flags                     = 16U;
            createActContextParameters.CustomStoreList           = IntPtr.Zero;
            createActContextParameters.CultureFallbackList       = IntPtr.Zero;
            createActContextParameters.ProcessorArchitectureList = IntPtr.Zero;
            createActContextParameters.Source                    = IntPtr.Zero;
            createActContextParameters.ProcArch                  = 0;
            IsolationInterop.CreateActContextParametersSource createActContextParametersSource;
            createActContextParametersSource.Size       = (uint)Marshal.SizeOf(typeof(IsolationInterop.CreateActContextParametersSource));
            createActContextParametersSource.Flags      = 0U;
            createActContextParametersSource.SourceType = 1U;
            createActContextParametersSource.Data       = IntPtr.Zero;
            IsolationInterop.CreateActContextParametersSourceDefinitionAppid createActContextParametersSourceDefinitionAppid;
            createActContextParametersSourceDefinitionAppid.Size  = (uint)Marshal.SizeOf(typeof(IsolationInterop.CreateActContextParametersSourceDefinitionAppid));
            createActContextParametersSourceDefinitionAppid.Flags = 0U;
            createActContextParametersSourceDefinitionAppid.AppId = AppId;
            IActContext result;

            try
            {
                createActContextParametersSource.Data = createActContextParametersSourceDefinitionAppid.ToIntPtr();
                createActContextParameters.Source     = createActContextParametersSource.ToIntPtr();
                result = (IsolationInterop.CreateActContext(ref createActContextParameters) as IActContext);
            }
            finally
            {
                if (createActContextParametersSource.Data != IntPtr.Zero)
                {
                    IsolationInterop.CreateActContextParametersSourceDefinitionAppid.Destroy(createActContextParametersSource.Data);
                    createActContextParametersSource.Data = IntPtr.Zero;
                }
                if (createActContextParameters.Source != IntPtr.Zero)
                {
                    IsolationInterop.CreateActContextParametersSource.Destroy(createActContextParameters.Source);
                    createActContextParameters.Source = IntPtr.Zero;
                }
            }
            return(result);
        }
Esempio n. 9
0
 internal static IActContext CreateActContext(IReferenceAppId AppId)
 {
     IsolationInterop.CreateActContextParameters Params;
     Params.Size                      = (uint)Marshal.SizeOf(typeof(IsolationInterop.CreateActContextParameters));
     Params.Flags                     = 16U;
     Params.CustomStoreList           = IntPtr.Zero;
     Params.CultureFallbackList       = IntPtr.Zero;
     Params.ProcessorArchitectureList = IntPtr.Zero;
     Params.Source                    = IntPtr.Zero;
     Params.ProcArch                  = (ushort)0;
     IsolationInterop.CreateActContextParametersSource parametersSource;
     parametersSource.Size       = (uint)Marshal.SizeOf(typeof(IsolationInterop.CreateActContextParametersSource));
     parametersSource.Flags      = 0U;
     parametersSource.SourceType = 2U;
     parametersSource.Data       = IntPtr.Zero;
     IsolationInterop.CreateActContextParametersSourceReferenceAppid sourceReferenceAppid;
     sourceReferenceAppid.Size  = (uint)Marshal.SizeOf(typeof(IsolationInterop.CreateActContextParametersSourceReferenceAppid));
     sourceReferenceAppid.Flags = 0U;
     sourceReferenceAppid.AppId = AppId;
     try
     {
         parametersSource.Data = sourceReferenceAppid.ToIntPtr();
         Params.Source         = parametersSource.ToIntPtr();
         return(IsolationInterop.CreateActContext(ref Params) as IActContext);
     }
     finally
     {
         if (parametersSource.Data != IntPtr.Zero)
         {
             IsolationInterop.CreateActContextParametersSourceDefinitionAppid.Destroy(parametersSource.Data);
             parametersSource.Data = IntPtr.Zero;
         }
         if (Params.Source != IntPtr.Zero)
         {
             IsolationInterop.CreateActContextParametersSource.Destroy(Params.Source);
             Params.Source = IntPtr.Zero;
         }
     }
 }
Esempio n. 10
0
 public static Store GetUserStore()
 {
     return(new Store(IsolationInterop.GetUserStore(0U, IntPtr.Zero, ref IsolationInterop.IID_IStore) as IStore));
 }
Esempio n. 11
0
        public StoreAssemblyFileEnumeration EnumFiles(EnumAssemblyFilesFlags Flags, IDefinitionIdentity Assembly)
        {
            Guid guidOfType = IsolationInterop.GetGuidOfType(typeof(IEnumSTORE_ASSEMBLY_FILE));

            return(new StoreAssemblyFileEnumeration((IEnumSTORE_ASSEMBLY_FILE)this._pStore.EnumFiles((uint)Flags, Assembly, ref guidOfType)));
        }