A | B | C |  D | E | F |  G | H | I |  J | K | L |  M | N | O |  P | Q | R |  S | T | U |  V | W | X |  Y | Z



CreateHardLink

The CreateHardLink function establishes an NTFS hard link between an existing file and a new file. An NTFS hard link is similar to a POSIX hard link.

VB4-32,5,6
Declare Function CreateHardLink Lib "kernel32.dll" Alias "CreateHardLinkA" (ByVal lpFileName As String, ByVal lpExistingFileName As String, ByRef lpSecurityAttributes As Any) As Long

Operating Systems Supported
Requires Windows 2000 or later; Win9x/ME: Not supported

Library
Kernel32

Parameter Information
- lpFileName
[in] Pointer to the name of the new directory entry to be created.

- lpExistingFileName
[in] Pointer to the name of the existing file to which the new link will point.

- lpSecurityAttributes
[in] Pointer to a SECURITY_ATTRIBUTES structure that specifies a security descriptor for the new file.
If this parameter is NULL, it leaves the file's existing security descriptor unmodified.

If this parameter is not NULL, it modifies the file's security descriptor.

Return Values
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.

Last update: 07 April 2006