1
0
forked from aniani/vim

patch 8.2.4875: MS-Windows: some .exe files are not recognized

Problem:    MS-Windows: some .exe files are not recognized.
Solution:   Parse APPEXECLINK junctions. (closes #10302)
This commit is contained in:
LemonBoy
2022-05-05 20:18:16 +01:00
committed by Bram Moolenaar
parent 365d8f76b5
commit 40fd7e6652
6 changed files with 158 additions and 4 deletions

View File

@@ -126,6 +126,45 @@
#ifndef IO_REPARSE_TAG_SYMLINK
# define IO_REPARSE_TAG_SYMLINK 0xA000000C
#endif
#ifndef IO_REPARSE_TAG_APPEXECLINK
# define IO_REPARSE_TAG_APPEXECLINK 0x8000001B
#endif
/*
* Definition of the reparse point buffer.
* This is usually defined in the DDK, copy the definition here to avoid
* adding it as a dependence only for a single structure.
*/
typedef struct _REPARSE_DATA_BUFFER {
ULONG ReparseTag;
USHORT ReparseDataLength;
USHORT Reserved;
union {
struct {
USHORT SubstituteNameOffset;
USHORT SubstituteNameLength;
USHORT PrintNameOffset;
USHORT PrintNameLength;
ULONG Flags;
WCHAR PathBuffer[1];
} SymbolicLinkReparseBuffer;
struct {
USHORT SubstituteNameOffset;
USHORT SubstituteNameLength;
USHORT PrintNameOffset;
USHORT PrintNameLength;
WCHAR PathBuffer[1];
} MountPointReparseBuffer;
struct {
UCHAR DataBuffer[1];
} GenericReparseBuffer;
struct
{
ULONG StringCount;
WCHAR StringList[1];
} AppExecLinkReparseBuffer;
} DUMMYUNIONNAME;
} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
#ifdef _MSC_VER
// Support for __try / __except. All versions of MSVC are