Kernel32CreatePrivateNamespace Method
Creates a private namespace.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("Kernel32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
public static IntPtr CreatePrivateNamespace(
ref SecurityAttributes refPrivateNamespaceAttributes,
IntPtr boundaryDescriptor,
string aliasPrefix
)
<DllImportAttribute("Kernel32.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function CreatePrivateNamespace (
ByRef refPrivateNamespaceAttributes As SecurityAttributes,
boundaryDescriptor As IntPtr,
aliasPrefix As String
) As IntPtr
Dim refPrivateNamespaceAttributes As SecurityAttributes
Dim boundaryDescriptor As IntPtr
Dim aliasPrefix As String
Dim returnValue As IntPtr
returnValue = Kernel32.CreatePrivateNamespace(refPrivateNamespaceAttributes,
boundaryDescriptor, aliasPrefix)
public:
[DllImportAttribute(L"Kernel32.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static IntPtr CreatePrivateNamespace(
SecurityAttributes% refPrivateNamespaceAttributes,
IntPtr boundaryDescriptor,
[InAttribute] String^ aliasPrefix
)
[<DllImportAttribute("Kernel32.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member CreatePrivateNamespace :
refPrivateNamespaceAttributes : SecurityAttributes byref *
boundaryDescriptor : IntPtr *
aliasPrefix : string -> IntPtr
No code example is currently available or this language may not be supported.
- refPrivateNamespaceAttributes SecurityAttributes
-
A pointer to a SecurityAttributes structure that specifies the security attributes of the namespace object.
- boundaryDescriptor IntPtr
-
A descriptor that defines how the namespace is to be isolated. The caller must be within this boundary.
The CreateBoundaryDescriptor(String, UInt32) function creates a boundary descriptor.
- aliasPrefix String
-
The prefix for the namespace. To create an object in this namespace, specify the object name as prefix<i>objectname.
The system supports multiple private namespaces with the same name, as long as they define different boundaries.
IntPtr
If the function succeeds, the return value is a handle to the new namespace.
If the function fails, the return value is
Zero.
To get extended error information, call
GetLastWin32Error.