コード例 #1
0
        public PrivateNamespaceHandle(BoundaryDescriptor boundaryDescriptor, string aliasPrefix)
        {
            this.Handle = Win32.OpenPrivateNamespace(boundaryDescriptor.Descriptor, aliasPrefix);

            if (this.Handle == IntPtr.Zero)
            {
                this.MarkAsInvalid();
                Win32.ThrowLastError();
            }
        }
コード例 #2
0
        public PrivateNamespaceHandle(BoundaryDescriptor boundaryDescriptor, string aliasPrefix)
        {
            this.Handle = Win32.OpenPrivateNamespace(boundaryDescriptor.Descriptor, aliasPrefix);

            if (this.Handle == IntPtr.Zero)
            {
                this.MarkAsInvalid();
                Win32.ThrowLastError();
            }
        }
コード例 #3
0
        public static PrivateNamespaceHandle Create(BoundaryDescriptor boundaryDescriptor, string aliasPrefix)
        {
            IntPtr handle = IntPtr.Zero;

            handle = Win32.CreatePrivateNamespace(IntPtr.Zero, boundaryDescriptor.Descriptor, aliasPrefix);

            if (handle == IntPtr.Zero)
                Win32.ThrowLastError();

            return new PrivateNamespaceHandle(handle, true);
        }
コード例 #4
0
        public static PrivateNamespaceHandle Create(BoundaryDescriptor boundaryDescriptor, string aliasPrefix)
        {
            IntPtr handle = IntPtr.Zero;

            handle = Win32.CreatePrivateNamespace(IntPtr.Zero, boundaryDescriptor.Descriptor, aliasPrefix);

            if (handle == IntPtr.Zero)
            {
                Win32.ThrowLastError();
            }

            return(new PrivateNamespaceHandle(handle, true));
        }