mirror of
https://gitea.tendokyu.moe/TeamTofuShop/segatools.git
synced 2026-09-27 12:29:05 +03:00
Merge pull request 'fix build by not depending on Windows DDK' (#126) from Haruka/segatools:fix-msvc into develop
Reviewed-on: https://gitea.tendokyu.moe/TeamTofuShop/segatools/pulls/126
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@@ -12,7 +11,6 @@
|
||||
|
||||
#include "hooklib/path.h"
|
||||
|
||||
#include <ntdef.h>
|
||||
#include <winioctl.h>
|
||||
#include <util/dprintf.h>
|
||||
|
||||
@@ -1810,7 +1808,7 @@ static BOOL WINAPI hook_DeviceIoControl(
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
REPARSE_DATA_BUFFER* mount = lpInBuffer;
|
||||
REPARSE_DATA_BUFFER* mount = (REPARSE_DATA_BUFFER*)lpInBuffer;
|
||||
|
||||
wchar_t *trans;
|
||||
wchar_t *src;
|
||||
|
||||
@@ -22,3 +22,35 @@ static inline bool path_is_separator_w(wchar_t c)
|
||||
{
|
||||
return c == L'\\' || c == L'/';
|
||||
}
|
||||
|
||||
// This is only defined in the Windows Driver SDK, so we copy the definition in here
|
||||
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;
|
||||
};
|
||||
} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
|
||||
Reference in New Issue
Block a user