<DllImport("kernel32.dll")> _
Private Shared Function CreateSymbolicLink(ByVal lpSymlinkFileName As String, ByVal lpTargetFileName As String, ByVal dwFlags As SYMBOLIC_LINK_FLAG) As Boolean
End Function
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
Tips & Tricks:
Please add some!
Sample Code:
Please add some!
Used with the CreateSymbolicLink function.
7/11/2009 2:31:02 AM - -74.46.19.88
TODO - a short description of this collection of constants
4/6/2012 7:59:20 AM - -136.169.149.84
Creates a symbolic link in the filesystem. Requires Vista or higher. Requires administrator access.
9/22/2009 10:24:46 AM - Gary Varga-82.211.83.9
The mechanism provided by the CLR that enables managed code to call static DLL exports.
3/16/2007 1:47:32 PM - -84.164.4.39
Please edit this page!
Do you have...
helpful tips or sample code to share for using this API in managed code?
corrections to the existing content?
variations of the signature you want to share?
additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more).