internal ReferenceAppId(IReferenceAppId id) { if (id == null) { throw new ArgumentNullException(); } this._id = id; }
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; } } }
public StoreDeploymentMetadataEnumeration EnumInstallerDeployments(Guid InstallerId, string InstallerName, string InstallerMetadata, IReferenceAppId DeploymentFilter) { StoreApplicationReference storeApplicationReference = new StoreApplicationReference(InstallerId, InstallerName, InstallerMetadata); object obj = this._pStore.EnumInstallerDeploymentMetadata(0U, ref storeApplicationReference, DeploymentFilter, ref IsolationInterop.IID_IEnumSTORE_DEPLOYMENT_METADATA); return(new StoreDeploymentMetadataEnumeration((IEnumSTORE_DEPLOYMENT_METADATA)obj)); }
public StoreDeploymentMetadataEnumeration EnumInstallerDeployments(Guid InstallerId, string InstallerName, string InstallerMetadata, IReferenceAppId DeploymentFilter) { StoreApplicationReference reference = new StoreApplicationReference(InstallerId, InstallerName, InstallerMetadata); return new StoreDeploymentMetadataEnumeration((IEnumSTORE_DEPLOYMENT_METADATA) this._pStore.EnumInstallerDeploymentMetadata(0, ref reference, DeploymentFilter, ref IsolationInterop.IID_IEnumSTORE_DEPLOYMENT_METADATA)); }
internal ReferenceAppId(IReferenceAppId id) { if (id == null) throw new ArgumentNullException(); _id = id; }
internal static IActContext CreateActContext(IReferenceAppId AppId) { CreateActContextParameters Parameters; CreateActContextParametersSource SourceInfo; CreateActContextParametersSourceReferenceAppid RefAppIdSource; Parameters.Size = (UInt32)Marshal.SizeOf(typeof(CreateActContextParameters)); Parameters.Flags = (UInt32)CreateActContextParameters.CreateFlags.SourceValid; Parameters.CustomStoreList = IntPtr.Zero; Parameters.CultureFallbackList = IntPtr.Zero; Parameters.ProcessorArchitectureList = IntPtr.Zero; Parameters.Source = IntPtr.Zero; Parameters.ProcArch = 0; SourceInfo.Size = (UInt32)Marshal.SizeOf(typeof(CreateActContextParametersSource)); SourceInfo.Flags = 0; SourceInfo.SourceType = (UInt32)CreateActContextParametersSource.SourceFlags.Reference; SourceInfo.Data = IntPtr.Zero; RefAppIdSource.Size = (UInt32)Marshal.SizeOf(typeof(CreateActContextParametersSourceReferenceAppid)); RefAppIdSource.Flags = 0; RefAppIdSource.AppId = AppId; try { SourceInfo.Data = RefAppIdSource.ToIntPtr(); Parameters.Source = SourceInfo.ToIntPtr(); return CreateActContext(ref Parameters) as IActContext; } // // Don't care about exceptions, but we don't want to leak nonmanaged heap // finally { if (SourceInfo.Data != IntPtr.Zero) { CreateActContextParametersSourceDefinitionAppid.Destroy(SourceInfo.Data); SourceInfo.Data = IntPtr.Zero; } if (Parameters.Source != IntPtr.Zero) { CreateActContextParametersSource.Destroy(Parameters.Source); Parameters.Source = IntPtr.Zero; } } }