Kernel32CreateSymbolicLink Method
Creates a symbolic link.
Namespace: DevCase.Win32.NativeMethodsAssembly: 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.Unicode, SetLastError = true)]
public static bool CreateSymbolicLink(
string dstPath,
string srcPath,
SymbolicLinkFlags flags
)
<DllImportAttribute("Kernel32.dll", CharSet := CharSet.Unicode, SetLastError := true>]
Public Shared Function CreateSymbolicLink (
dstPath As String,
srcPath As String,
flags As SymbolicLinkFlags
) As Boolean
Dim dstPath As String
Dim srcPath As String
Dim flags As SymbolicLinkFlags
Dim returnValue As Boolean
returnValue = Kernel32.CreateSymbolicLink(dstPath,
srcPath, flags)
public:
[DllImportAttribute(L"Kernel32.dll", CharSet = CharSet::Unicode, SetLastError = true)]
static bool CreateSymbolicLink(
String^ dstPath,
String^ srcPath,
SymbolicLinkFlags flags
)
[<DllImportAttribute("Kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)>]
static member CreateSymbolicLink :
dstPath : string *
srcPath : string *
flags : SymbolicLinkFlags -> bool
No code example is currently available or this language may not be supported.
- dstPath String
-
The path of the symbolic link to be created.
- srcPath String
-
The path of the target for the symbolic link to be created.
If srcPath has a device name associated with it,
the link is treated as an absolute link;
otherwise, the link is treated as a relative link.
- flags SymbolicLinkFlags
-
Indicates whether the link target is a file or is a directory.
Boolean
If the function succeeds, the return value is
.
If the function fails, the return value is
.
To get extended error information, call
GetLastWin32Error.