Kernel32CreatePrivateNamespace Method

Creates a private namespace.

Definition

Namespace: DevCase.Win32.NativeMethods
Assembly: 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
)

Parameters

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.

Return Value

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.

Remarks

See Also