CreateSymbolicLinkW

Creates a symbolic link.

version(Windows)
extern (Windows) nothrow @nogc
BOOLEAN
CreateSymbolicLinkW

Parameters

lpSymlinkFileName LPCWSTR

The symbolic link to be created.

This parameter may include the path. In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\?\" to the path.

lpTargetFileName LPCWSTR

The name of the target for the symbolic link to be created.

If lpTargetFileName has a device name associated with it, the link is treated as an absolute link; otherwise, the link is treated as a relative link.

This parameter may include the path. In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\?\" to the path.

dwFlags DWORD

Indicates whether the link target, lpTargetFileName, is a directory.

0x0 - The link target is a file. SYMBOLIC_LINK_FLAG_DIRECTORY - The link target is a directory. SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE - Specify this flag to allow creation of symbolic links when the process is not elevated. Developer Mode must first be enabled on the machine before this option will function.

Return Value

Type: BOOLEAN

If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError.

Meta