NtQuerySymbolicLinkObject function

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

Retrieves the target of a symbolic link.

Syntax

NTSTATUS WINAPI NtQuerySymbolicLinkObject(
  _In_      HANDLE          LinkHandle,
  _Inout_   PUNICODE_STRING LinkTarget,
  _Out_opt_ PULONG          ReturnedLength
);

Parameters

LinkHandle [in]

A handle to the symbolic link object.

LinkTarget [in, out]

A pointer to an initialized Unicode string that receives the target of the symbolic link. The MaximumLength and Buffer members must be set if the call fails.

ReturnedLength [out, optional]

A pointer to a variable that receives the length of the Unicode string returned in the LinkTarget parameter. If the function returns STATUS_BUFFER_TOO_SMALL, this variable receives the required buffer size.

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

NtOpenSymbolicLinkObject