7#ifdef INCLUDE_CMD_MKLINK
53 #define TargetFullPathW TargetFullPath
92 + TargetLen +
sizeof(
WCHAR));
99 Data->MountPointReparseBuffer.SubstituteNameOffset = 0;
100 Data->MountPointReparseBuffer.SubstituteNameLength = TargetNTPath.
Length;
101 wcscpy(
Data->MountPointReparseBuffer.PathBuffer,
103 Data->MountPointReparseBuffer.PrintNameOffset = TargetNTPath.
Length +
sizeof(
WCHAR);
104 Data->MountPointReparseBuffer.PrintNameLength = (
USHORT)TargetLen;
106 +
Data->MountPointReparseBuffer.PrintNameOffset),
128 enum { SYMBOLIC, HARD, JUNCTION } LinkType = SYMBOLIC;
179 if (LinkType == SYMBOLIC)
195 else if (LinkType == HARD)
205 if (CreateHardLink && CreateHardLink(
Name[0],
Name[1],
NULL))
static VOID ErrorMessage(_In_ DWORD dwErrorCode, _In_opt_ PCWSTR pszMsg,...)
VOID error_too_many_parameters(PCTSTR s)
VOID error_req_param_missing(VOID)
VOID error_invalid_switch(TCHAR ch)
#define STRING_MKLINK_CREATED_JUNCTION
#define STRING_MKLINK_CREATED_HARD
#define STRING_MKLINK_CREATED_SYMBOLIC
#define STRING_MKLINK_HELP
static VOID freep(LPSTR *p)
static LPSTR * split(LPSTR s, LPINT args)
BOOL WINAPI DeviceIoControl(IN HANDLE hDevice, IN DWORD dwIoControlCode, IN LPVOID lpInBuffer OPTIONAL, IN DWORD nInBufferSize OPTIONAL, OUT LPVOID lpOutBuffer OPTIONAL, IN DWORD nOutBufferSize OPTIONAL, OUT LPDWORD lpBytesReturned OPTIONAL, IN LPOVERLAPPED lpOverlapped OPTIONAL)
struct _SECURITY_ATTRIBUTES * LPSECURITY_ATTRIBUTES
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define MultiByteToWideChar
static LPWSTR CreateSymbolicLink(IN LPGUID InterfaceGuid, IN LPCWSTR ReferenceString, IN struct DeviceInfo *devInfo)
UNICODE_STRING * PUNICODE_STRING
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
INT cmd_mklink(LPTSTR param)
static BOOL CreateJunction(LPCTSTR LinkName, LPCTSTR TargetName)
#define FILE_FLAG_BACKUP_SEMANTICS
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
NTSYSAPI BOOLEAN NTAPI RtlDosPathNameToNtPathName_U(_In_opt_z_ PCWSTR DosPathName, _Out_ PUNICODE_STRING NtPathName, _Out_opt_ PCWSTR *NtFileNamePart, _Out_opt_ PRTL_RELATIVE_NAME_U DirectoryInfo)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define FSCTL_SET_REPARSE_POINT
#define ConOutResPrintf(uID,...)
#define ConOutResPuts(uID)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
struct _REPARSE_DATA_BUFFER REPARSE_DATA_BUFFER
struct _REPARSE_DATA_BUFFER * PREPARSE_DATA_BUFFER
USHORT SubstituteNameLength
USHORT SubstituteNameOffset
struct _REPARSE_DATA_BUFFER::@312::@314 SymbolicLinkReparseBuffer
struct _REPARSE_DATA_BUFFER::@312::@315 MountPointReparseBuffer
struct _REPARSE_DATA_BUFFER::@312::@316 GenericReparseBuffer
_ANONYMOUS_UNION union _REPARSE_DATA_BUFFER::@4080 DUMMYUNIONNAME
#define FIELD_OFFSET(t, f)
DWORD WINAPI GetLastError(void)
_Must_inspect_result_ _In_ ULONG Flags
#define IO_REPARSE_TAG_MOUNT_POINT