Desktop Functions: Smart Device Functions:
|
Search Results for "CreateSymbolicLink" in [All]ntdll
SeCreateSymbolicLinkPrivilege = 35 advapi32
return "SeCreateSymbolicLinkPrivilege";
SeCreateSymbolicLinkPrivilege kernel32
static extern bool CreateSymbolicLink(string lpSymlinkFileName, string lpTargetFileName, SYMBOLIC_LINK_FLAG dwFlags);
Private Shared Function CreateSymbolicLink(ByVal lpSymlinkFileName As String, ByVal lpTargetFileName As String, ByVal dwFlags As SYMBOLIC_LINK_FLAG) As Boolean Without administrator access, CreateSymbolicLink returns true, without creating a new link. If lpSymlinkFileName already exists, CreateSymbolicLink returns false. If lpTargetFileName does not exist, CreateSymbolicLink returns true. Since the lpTargetFileName may or may not exist, when lpSymlinkFileName is next used, this makes sense. The unmanaged prototype contains a return directive because the CreateSymbolicLink API function returns BOOLEAN, a one-byte data type. The default marshaling for bool is four bytes (to allow seamless integration with BOOL return values). If you were to use the default marshaling for BOOLEAN values, it's likely that you will get erroneous results. The return directive forces PInvoke to marshal just one byte of the return value. Source: http://www.informit.com/guides/content.aspx?g=dotnet&seqNum=762&ns=16196 Enums |