NtOpenSymbolicLinkObject function

[This function may be altered or unavailable in the future.]

Opens an existing symbolic link.

Syntax

NTSTATUS WINAPI NtOpenSymbolicLinkObject(
  _Out_ PHANDLE            LinkHandle,
  _In_  ACCESS_MASK        DesiredAccess,
  _In_  POBJECT_ATTRIBUTES ObjectAttributes
);

Parameters

LinkHandle [out]

A handle to the newly opened symbolic link object.

DesiredAccess [in]

An ACCESS_MASK that specifies the requested access to the directory object. It is typical to use GENERIC_READ so the handle can be passed to the NtQueryDirectoryObject function.

ObjectAttributes [in]

The attributes for the directory object. To initialize the OBJECT_ATTRIBUTES structure, use the InitializeObjectAttributes macro. If the caller is not running in a system thread context, it must specify the OBJ_KERNEL_HANDLE flag when initializing the structure. For more information, see the documentation for these items in the documentation for the WDK.

Return value

The function returns STATUS_SUCCESS or an error status.

Remarks

This function has no associated import library or header file; you must call it using the LoadLibrary and GetProcAddress functions.

Requirements

Requirement Value
DLL
Ntdll.dll

See also

NtQueryDirectoryObject