#ifndef _NTOBAPI_H
//
// Symbolic links
//
#if (PHNT_MODE != PHNT_MODE_KERNEL)
/**
* The NtCreateSymbolicLinkObject routine creates a symbolic link object.
*
* \param LinkHandle Pointer to a HANDLE variable that receives a handle to the symbolic link object.
* \param DesiredAccess An ACCESS_MASK that specifies the requested access to the symbolic link object.
* \param ObjectAttributes The attributes for the symbolic link object.
* \param LinkTarget A pointer to a UNICODE_STRING that specifies the target name.
* \return NTSTATUS Successful or errant status.
* \sa https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-zwcreatesymboliclinkobject
* \remarks ObjectAttributes and LinkTarget are required pointers.
* LinkTarget.Length must be even and no greater than MaximumLength after MaximumLength
* is rounded down to an even value; that rounded maximum must be nonzero. For user-mode
* callers the kernel copies MaximumLength bytes, not just Length: every advertised byte
* must be readable. A terminator is preserved only if supplied in those copied bytes.
* This creates an Object Manager link, not a file-system reparse point.
*/
_Kernel_entry_
NTSYSCALLAPI
NTSTATUS
NTAPI
NtCreateSymbolicLinkObject(
_Out_ PHANDLE LinkHandle,
_In_ ACCESS_MASK DesiredAccess,
_In_ POBJECT_ATTRIBUTES ObjectAttributes,
_In_ PCUNICODE_STRING LinkTarget
);
View code on GitHub#ifndef _NTZWAPI_H
_Kernel_entry_
NTSYSCALLAPI
NTSTATUS
NTAPI
ZwCreateSymbolicLinkObject(
_Out_ PHANDLE LinkHandle,
_In_ ACCESS_MASK DesiredAccess,
_In_ POBJECT_ATTRIBUTES ObjectAttributes,
_In_ PCUNICODE_STRING LinkTarget
);
View code on GitHubNo description available.
Handle to SymbolicLinkObject.
Name of SymbolicLinkObject.
Name or path to destination object in Object Namespace.