- diff --git a/build.vc19/nfs41_driver/nfs41_driver.vcxproj b/build.vc19/nfs41_driver/nfs41_driver.vcxproj
- index a786711..619fdf6 100644
- --- a/build.vc19/nfs41_driver/nfs41_driver.vcxproj
- +++ b/build.vc19/nfs41_driver/nfs41_driver.vcxproj
- @@ -135,13 +135,13 @@
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
- <ClCompile>
- - <AdditionalIncludeDirectories>..\..\include;..\..\dll;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- + <AdditionalIncludeDirectories>..\..\include;..\..\dll;..\..;$(WindowsSdkDir)Include0.0.19041.0\km;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>EXPLODE_POOLTAGS;MONOLITHIC_MINIRDR;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <StringPooling>true</StringPooling>
- - <AdditionalOptions>/std:c17 /Zc:preprocessor- /kernel /wd4100 /wd4201 /wd5104</AdditionalOptions>
- + <AdditionalOptions>/std:c17 /kernel /wd4100 /wd4201 /wd5104</AdditionalOptions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\ntoskrnl.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\hal.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\BufferOverflowfastfailK.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\ksecdd.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\rxce.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\rdbsslib.lib</AdditionalDependencies>
- @@ -149,13 +149,13 @@
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
- <ClCompile>
- - <AdditionalIncludeDirectories>..\..\include;..\..\dll;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- + <AdditionalIncludeDirectories>..\..\include;..\..\dll;..\..;$(WindowsSdkDir)Include0.0.19041.0\km;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <PreprocessorDefinitions>EXPLODE_POOLTAGS;MONOLITHIC_MINIRDR;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <StringPooling>true</StringPooling>
- - <AdditionalOptions>/std:c17 /Zc:preprocessor- /kernel /wd4100 /wd4201 /wd5104</AdditionalOptions>
- + <AdditionalOptions>/std:c17 /kernel /wd4100 /wd4201 /wd5104</AdditionalOptions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\ntoskrnl.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\hal.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\BufferOverflowfastfailK.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\ksecdd.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\rxce.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\rdbsslib.lib</AdditionalDependencies>
- @@ -163,13 +163,13 @@
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
- <ClCompile>
- - <AdditionalIncludeDirectories>..\..\include;..\..\dll;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- + <AdditionalIncludeDirectories>..\..\include;..\..\dll;..\..;$(WindowsSdkDir)Include0.0.19041.0\km;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>EXPLODE_POOLTAGS;MONOLITHIC_MINIRDR;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <StringPooling>true</StringPooling>
- - <AdditionalOptions>/std:c17 /Zc:preprocessor- /kernel /wd4100 /wd4201 /wd5104</AdditionalOptions>
- + <AdditionalOptions>/std:c17 /kernel /wd4100 /wd4201 /wd5104</AdditionalOptions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\ntoskrnl.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\hal.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\BufferOverflowfastfailK.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\ksecdd.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\rxce.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\rdbsslib.lib;$(WindowsSdkDir)lib\win7\km\$(DDKPlatform)\copysup.lib</AdditionalDependencies>
- @@ -177,13 +177,13 @@
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
- <ClCompile>
- - <AdditionalIncludeDirectories>..\..\include;..\..\dll;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- + <AdditionalIncludeDirectories>..\..\include;..\..\dll;..\..;$(WindowsSdkDir)Include0.0.19041.0\km;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <PreprocessorDefinitions>EXPLODE_POOLTAGS;MONOLITHIC_MINIRDR;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <StringPooling>true</StringPooling>
- - <AdditionalOptions>/std:c17 /Zc:preprocessor- /kernel /wd4100 /wd4201 /wd5104</AdditionalOptions>
- + <AdditionalOptions>/std:c17 /kernel /wd4100 /wd4201 /wd5104</AdditionalOptions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\ntoskrnl.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\hal.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\BufferOverflowfastfailK.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\ksecdd.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\rxce.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\rdbsslib.lib;$(WindowsSdkDir)lib\win7\km\$(DDKPlatform)\copysup.lib</AdditionalDependencies>
- @@ -191,13 +191,13 @@
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
- <ClCompile>
- - <AdditionalIncludeDirectories>..\..\include;..\..\dll;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- + <AdditionalIncludeDirectories>..\..\include;..\..\dll;..\..;$(WindowsSdkDir)Include0.0.19041.0\km;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>EXPLODE_POOLTAGS;MONOLITHIC_MINIRDR;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <StringPooling>true</StringPooling>
- - <AdditionalOptions>/std:c17 /Zc:preprocessor- /kernel /wd4100 /wd4201 /wd5104</AdditionalOptions>
- + <AdditionalOptions>/std:c17 /kernel /wd4100 /wd4201 /wd5104</AdditionalOptions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\ntoskrnl.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\hal.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\BufferOverflowfastfailK.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\ksecdd.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\rxce.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\rdbsslib.lib</AdditionalDependencies>
- @@ -205,13 +205,13 @@
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
- <ClCompile>
- - <AdditionalIncludeDirectories>..\..\include;..\..\dll;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- + <AdditionalIncludeDirectories>..\..\include;..\..\dll;..\..;$(WindowsSdkDir)Include0.0.19041.0\km;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <PreprocessorDefinitions>EXPLODE_POOLTAGS;MONOLITHIC_MINIRDR;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <StringPooling>true</StringPooling>
- - <AdditionalOptions>/std:c17 /Zc:preprocessor- /kernel /wd4100 /wd4201 /wd5104</AdditionalOptions>
- + <AdditionalOptions>/std:c17 /kernel /wd4100 /wd4201 /wd5104</AdditionalOptions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\ntoskrnl.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\hal.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\BufferOverflowfastfailK.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\ksecdd.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\rxce.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\rdbsslib.lib</AdditionalDependencies>
- @@ -219,13 +219,13 @@
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- - <AdditionalIncludeDirectories>..\..\include;..\..\dll;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- + <AdditionalIncludeDirectories>..\..\include;..\..\dll;..\..;$(WindowsSdkDir)Include0.0.19041.0\km;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>EXPLODE_POOLTAGS;MONOLITHIC_MINIRDR;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <StringPooling>true</StringPooling>
- - <AdditionalOptions>/std:c17 /Zc:preprocessor- /kernel /wd4100 /wd4201 /wd5104</AdditionalOptions>
- + <AdditionalOptions>/std:c17 /kernel /wd4100 /wd4201 /wd5104</AdditionalOptions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\ntoskrnl.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\hal.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\BufferOverflowfastfailK.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\ksecdd.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\rxce.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\rdbsslib.lib;$(WindowsSdkDir)lib\win7\km\$(DDKPlatform)\copysup.lib</AdditionalDependencies>
- @@ -233,13 +233,13 @@
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- - <AdditionalIncludeDirectories>..\..\include;..\..\dll;..\..;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- + <AdditionalIncludeDirectories>..\..\include;..\..\dll;..\..;$(WindowsSdkDir)Include0.0.19041.0\km;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <WarningLevel>Level4</WarningLevel>
- <Optimization>MaxSpeed</Optimization>
- <PreprocessorDefinitions>EXPLODE_POOLTAGS;MONOLITHIC_MINIRDR;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <LanguageStandard_C>stdc17</LanguageStandard_C>
- <StringPooling>true</StringPooling>
- - <AdditionalOptions>/std:c17 /Zc:preprocessor- /kernel /wd4100 /wd4201 /wd5104</AdditionalOptions>
- + <AdditionalOptions>/std:c17 /kernel /wd4100 /wd4201 /wd5104</AdditionalOptions>
- </ClCompile>
- <Link>
- <AdditionalDependencies>$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\ntoskrnl.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\hal.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\BufferOverflowfastfailK.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\ksecdd.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\rxce.lib;$(WindowsSdkDir)lib\10.0.19041.0\km\$(DDKPlatform)\rdbsslib.lib;$(WindowsSdkDir)lib\win7\km\$(DDKPlatform)\copysup.lib</AdditionalDependencies>
- diff --git a/sys/copysup.c b/sys/copysup.c
- index 799caf9..26ff10a 100644
- --- a/sys/copysup.c
- +++ b/sys/copysup.c
- @@ -26,6 +26,22 @@
- #error Code requires ISO C17
- #endif
- +/* FIXME: Why does VS22 need this, but not VC19 ? */
- +#if _MSC_VER >= 1900
- +#if defined(_WIN64) && defined(_M_X64)
- +#define _AMD64_
- +#elif defined(_WIN32) && defined(_M_IX86)
- +#define _X86_
- +#elif defined(_WIN64) && defined(_M_ARM64)
- +#define _ARM64_
- +#elif defined(_WIN32) && defined(_M_ARM)
- +#define _ARM_
- +#else
- +#error Unsupported arch
- +#endif
- +#endif /* _MSC_VER >= 1900 */
- +
- +
- #include <rx.h>
- #include <windef.h>
- #include <winerror.h>
- diff --git a/sys/nfs41_debug.c b/sys/nfs41_debug.c
- index d169611..f8c99c0 100644
- --- a/sys/nfs41_debug.c
- +++ b/sys/nfs41_debug.c
- @@ -20,6 +20,23 @@
- */
- #define MINIRDR__NAME "Value is ignored, only fact of definition"
- +
- +/* FIXME: Why does VS22 need this, but not VC19 ? */
- +#if _MSC_VER >= 1900
- +#if defined(_WIN64) && defined(_M_X64)
- +#define _AMD64_
- +#elif defined(_WIN32) && defined(_M_IX86)
- +#define _X86_
- +#elif defined(_WIN64) && defined(_M_ARM64)
- +#define _ARM64_
- +#elif defined(_WIN32) && defined(_M_ARM)
- +#define _ARM_
- +#else
- +#error Unsupported arch
- +#endif
- +#endif /* _MSC_VER >= 1900 */
- +
- +
- #include <rx.h>
- #include "nfs41_driver.h"
- diff --git a/sys/nfs41_debug.h b/sys/nfs41_debug.h
- index 8f45e51..0c3f7c4 100644
- --- a/sys/nfs41_debug.h
- +++ b/sys/nfs41_debug.h
- @@ -63,18 +63,18 @@ const char *fsctl2string(ULONG fsctl);
- #define DbgEn() DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL, \
- "--> [%s] [%04x] %s\n", _DRIVER_NAME_, PsGetCurrentProcessShortDebugId(), \
- - __func__); try {
- + __func__); __try {
- #define DbgEx() DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL, \
- "<-- [%s] [%04x] %s status = %08lx\n", _DRIVER_NAME_, PsGetCurrentProcessShortDebugId(), \
- __func__, status); \
- - } except (EXCEPTION_EXECUTE_HANDLER) { \
- + } __except (EXCEPTION_EXECUTE_HANDLER) { \
- status = GetExceptionCode() ; \
- DbgP("Exception encountered with value = Ox%x\n", status); \
- }
- #define DbgR() DbgPrintEx(DPFLTR_IHVNETWORK_ID, DPFLTR_ERROR_LEVEL, \
- "<-- [%s] [%04x] %s\n", _DRIVER_NAME_, PsGetCurrentProcessShortDebugId(), __func__); \
- - } except (EXCEPTION_EXECUTE_HANDLER) { \
- + } __except (EXCEPTION_EXECUTE_HANDLER) { \
- NTSTATUS exc_status; \
- exc_status = GetExceptionCode() ; \
- DbgP("Exception encountered with value = Ox%x\n", (int)exc_status); \
- diff --git a/sys/nfs41_driver.c b/sys/nfs41_driver.c
- index 1214fa8..fc573bb 100644
- --- a/sys/nfs41_driver.c
- +++ b/sys/nfs41_driver.c
- @@ -28,6 +28,21 @@
- #error Code requires ISO C17
- #endif
- +/* FIXME: Why does VS22 need this, but not VC19 ? */
- +#if _MSC_VER >= 1900
- +#if defined(_WIN64) && defined(_M_X64)
- +#define _AMD64_
- +#elif defined(_WIN32) && defined(_M_IX86)
- +#define _X86_
- +#elif defined(_WIN64) && defined(_M_ARM64)
- +#define _ARM64_
- +#elif defined(_WIN32) && defined(_M_ARM)
- +#define _ARM_
- +#else
- +#error Unsupported arch
- +#endif
- +#endif /* _MSC_VER >= 1900 */
- +
- #define MINIRDR__NAME "Value is ignored, only fact of definition"
- #include <rx.h>
- #include <windef.h>
- @@ -292,6 +307,18 @@ typedef struct _updowncall_list {
- nfs41_updowncall_list upcall, downcall;
- +#if _MSC_VER >= 1900
- +/*
- + * gisburn: VS22 chokes on the original define for
- + * |DECLARE_CONST_UNICODE_STRING|, so we use one
- + * without the offending stuff
- + */
- +#undef DECLARE_CONST_UNICODE_STRING
- +#define DECLARE_CONST_UNICODE_STRING(_var, _string) \
- + const WCHAR _var ## _buffer[] = _string; \
- + const UNICODE_STRING _var = { sizeof(_string) - sizeof(WCHAR), sizeof(_string), (PWCH) _var ## _buffer }
- +#endif /* _MSC_VER >= 1900 */
- +
- /*
- * In order to cooperate with other network providers,
- @@ -2804,7 +2831,7 @@ static NTSTATUS nfs41_CreateSrvCall(
- status = _nfs41_CreateSrvCall(pCallbackContext);
- } else {
- status = RxDispatchToWorkerThread(nfs41_dev, DelayedWorkQueue,
- - _nfs41_CreateSrvCall, pCallbackContext);
- + (PRX_WORKERTHREAD_ROUTINE)_nfs41_CreateSrvCall, pCallbackContext);
- if (status != STATUS_SUCCESS) {
- print_error("RxDispatchToWorkerThread returned status %08lx\n",
- status);
- @@ -7618,83 +7645,83 @@ static NTSTATUS nfs41_init_ops()
- // while the others continue to operate.
- //
- - nfs41_ops.MRxStart = nfs41_Start;
- - nfs41_ops.MRxStop = nfs41_Stop;
- - nfs41_ops.MRxDevFcbXXXControlFile = nfs41_DevFcbXXXControlFile;
- + nfs41_ops.MRxStart = (PMRX_CALLDOWN_CTX)nfs41_Start;
- + nfs41_ops.MRxStop = (PMRX_CALLDOWN_CTX)nfs41_Stop;
- + nfs41_ops.MRxDevFcbXXXControlFile = (PMRX_CALLDOWN)nfs41_DevFcbXXXControlFile;
- //
- // Mini redirector name resolution.
- //
- - nfs41_ops.MRxCreateSrvCall = nfs41_CreateSrvCall;
- - nfs41_ops.MRxSrvCallWinnerNotify = nfs41_SrvCallWinnerNotify;
- - nfs41_ops.MRxCreateVNetRoot = nfs41_CreateVNetRoot;
- - nfs41_ops.MRxExtractNetRootName = nfs41_ExtractNetRootName;
- - nfs41_ops.MRxFinalizeSrvCall = nfs41_FinalizeSrvCall;
- - nfs41_ops.MRxFinalizeNetRoot = nfs41_FinalizeNetRoot;
- - nfs41_ops.MRxFinalizeVNetRoot = nfs41_FinalizeVNetRoot;
- + nfs41_ops.MRxCreateSrvCall = (PMRX_CREATE_SRVCALL)nfs41_CreateSrvCall;
- + nfs41_ops.MRxSrvCallWinnerNotify = (PMRX_SRVCALL_WINNER_NOTIFY)nfs41_SrvCallWinnerNotify;
- + nfs41_ops.MRxCreateVNetRoot = (PMRX_CREATE_V_NET_ROOT)nfs41_CreateVNetRoot;
- + nfs41_ops.MRxExtractNetRootName = (PMRX_EXTRACT_NETROOT_NAME)nfs41_ExtractNetRootName;
- + nfs41_ops.MRxFinalizeSrvCall = (PMRX_FINALIZE_SRVCALL_CALLDOWN)nfs41_FinalizeSrvCall;
- + nfs41_ops.MRxFinalizeNetRoot = (PMRX_FINALIZE_NET_ROOT_CALLDOWN)nfs41_FinalizeNetRoot;
- + nfs41_ops.MRxFinalizeVNetRoot = (PMRX_FINALIZE_V_NET_ROOT_CALLDOWN)nfs41_FinalizeVNetRoot;
- //
- // File System Object Creation/Deletion.
- //
- - nfs41_ops.MRxCreate = nfs41_Create;
- - nfs41_ops.MRxCollapseOpen = nfs41_CollapseOpen;
- - nfs41_ops.MRxShouldTryToCollapseThisOpen = nfs41_ShouldTryToCollapseThisOpen;
- - nfs41_ops.MRxExtendForCache = nfs41_ExtendForCache;
- - nfs41_ops.MRxExtendForNonCache = nfs41_ExtendForCache;
- - nfs41_ops.MRxCloseSrvOpen = nfs41_CloseSrvOpen;
- - nfs41_ops.MRxFlush = nfs41_Flush;
- - nfs41_ops.MRxDeallocateForFcb = nfs41_DeallocateForFcb;
- - nfs41_ops.MRxDeallocateForFobx = nfs41_DeallocateForFobx;
- - nfs41_ops.MRxIsLockRealizable = nfs41_IsLockRealizable;
- + nfs41_ops.MRxCreate = (PMRX_CALLDOWN)nfs41_Create;
- + nfs41_ops.MRxCollapseOpen = (PMRX_CALLDOWN)nfs41_CollapseOpen;
- + nfs41_ops.MRxShouldTryToCollapseThisOpen = (PMRX_CALLDOWN)nfs41_ShouldTryToCollapseThisOpen;
- + nfs41_ops.MRxExtendForCache = (PMRX_EXTENDFILE_CALLDOWN)nfs41_ExtendForCache;
- + nfs41_ops.MRxExtendForNonCache = (PMRX_EXTENDFILE_CALLDOWN)nfs41_ExtendForCache;
- + nfs41_ops.MRxCloseSrvOpen = (PMRX_CALLDOWN)nfs41_CloseSrvOpen;
- + nfs41_ops.MRxFlush = (PMRX_CALLDOWN)nfs41_Flush;
- + nfs41_ops.MRxDeallocateForFcb = (PMRX_DEALLOCATE_FOR_FCB)nfs41_DeallocateForFcb;
- + nfs41_ops.MRxDeallocateForFobx = (PMRX_DEALLOCATE_FOR_FOBX)nfs41_DeallocateForFobx;
- + nfs41_ops.MRxIsLockRealizable = (PMRX_IS_LOCK_REALIZABLE)nfs41_IsLockRealizable;
- //
- // File System Objects query/Set
- //
- - nfs41_ops.MRxQueryDirectory = nfs41_QueryDirectory;
- - nfs41_ops.MRxQueryVolumeInfo = nfs41_QueryVolumeInformation;
- - nfs41_ops.MRxQueryEaInfo = nfs41_QueryEaInformation;
- - nfs41_ops.MRxSetEaInfo = nfs41_SetEaInformation;
- - nfs41_ops.MRxQuerySdInfo = nfs41_QuerySecurityInformation;
- - nfs41_ops.MRxSetSdInfo = nfs41_SetSecurityInformation;
- - nfs41_ops.MRxQueryFileInfo = nfs41_QueryFileInformation;
- - nfs41_ops.MRxSetFileInfo = nfs41_SetFileInformation;
- + nfs41_ops.MRxQueryDirectory = (PMRX_CALLDOWN)nfs41_QueryDirectory;
- + nfs41_ops.MRxQueryVolumeInfo = (PMRX_CALLDOWN)nfs41_QueryVolumeInformation;
- + nfs41_ops.MRxQueryEaInfo = (PMRX_CALLDOWN)nfs41_QueryEaInformation;
- + nfs41_ops.MRxSetEaInfo = (PMRX_CALLDOWN)nfs41_SetEaInformation;
- + nfs41_ops.MRxQuerySdInfo = (PMRX_CALLDOWN)nfs41_QuerySecurityInformation;
- + nfs41_ops.MRxSetSdInfo = (PMRX_CALLDOWN)nfs41_SetSecurityInformation;
- + nfs41_ops.MRxQueryFileInfo = (PMRX_CALLDOWN)nfs41_QueryFileInformation;
- + nfs41_ops.MRxSetFileInfo = (PMRX_CALLDOWN)nfs41_SetFileInformation;
- //
- // Buffering state change
- //
- - nfs41_ops.MRxComputeNewBufferingState = nfs41_ComputeNewBufferingState;
- + nfs41_ops.MRxComputeNewBufferingState = (PMRX_COMPUTE_NEW_BUFFERING_STATE)nfs41_ComputeNewBufferingState;
- //
- // File System Object I/O
- //
- - nfs41_ops.MRxLowIOSubmit[LOWIO_OP_READ] = nfs41_Read;
- - nfs41_ops.MRxLowIOSubmit[LOWIO_OP_WRITE] = nfs41_Write;
- - nfs41_ops.MRxLowIOSubmit[LOWIO_OP_SHAREDLOCK] = nfs41_Lock;
- - nfs41_ops.MRxLowIOSubmit[LOWIO_OP_EXCLUSIVELOCK] = nfs41_Lock;
- - nfs41_ops.MRxLowIOSubmit[LOWIO_OP_UNLOCK] = nfs41_Unlock;
- - nfs41_ops.MRxLowIOSubmit[LOWIO_OP_UNLOCK_MULTIPLE] = nfs41_Unlock;
- - nfs41_ops.MRxLowIOSubmit[LOWIO_OP_FSCTL] = nfs41_FsCtl;
- - nfs41_ops.MRxLowIOSubmit[LOWIO_OP_IOCTL] = nfs41_IoCtl;
- + nfs41_ops.MRxLowIOSubmit[LOWIO_OP_READ] = (PMRX_CALLDOWN)nfs41_Read;
- + nfs41_ops.MRxLowIOSubmit[LOWIO_OP_WRITE] = (PMRX_CALLDOWN)nfs41_Write;
- + nfs41_ops.MRxLowIOSubmit[LOWIO_OP_SHAREDLOCK] = (PMRX_CALLDOWN)nfs41_Lock;
- + nfs41_ops.MRxLowIOSubmit[LOWIO_OP_EXCLUSIVELOCK] = (PMRX_CALLDOWN)nfs41_Lock;
- + nfs41_ops.MRxLowIOSubmit[LOWIO_OP_UNLOCK] = (PMRX_CALLDOWN)nfs41_Unlock;
- + nfs41_ops.MRxLowIOSubmit[LOWIO_OP_UNLOCK_MULTIPLE] = (PMRX_CALLDOWN)nfs41_Unlock;
- + nfs41_ops.MRxLowIOSubmit[LOWIO_OP_FSCTL] = (PMRX_CALLDOWN)nfs41_FsCtl;
- + nfs41_ops.MRxLowIOSubmit[LOWIO_OP_IOCTL] = (PMRX_CALLDOWN)nfs41_IoCtl;
- //
- // Miscellanous
- //
- - nfs41_ops.MRxCompleteBufferingStateChangeRequest =
- - nfs41_CompleteBufferingStateChangeRequest;
- - nfs41_ops.MRxIsValidDirectory = nfs41_IsValidDirectory;
- + nfs41_ops.MRxCompleteBufferingStateChangeRequest =
- + (PMRX_CHANGE_BUFFERING_STATE_CALLDOWN)nfs41_CompleteBufferingStateChangeRequest;
- + nfs41_ops.MRxIsValidDirectory = (PMRX_CHKDIR_CALLDOWN)nfs41_IsValidDirectory;
- - nfs41_ops.MRxTruncate = nfs41_Unimplemented;
- - nfs41_ops.MRxZeroExtend = nfs41_Unimplemented;
- - nfs41_ops.MRxAreFilesAliased = nfs41_AreFilesAliased;
- - nfs41_ops.MRxQueryQuotaInfo = nfs41_Unimplemented;
- - nfs41_ops.MRxSetQuotaInfo = nfs41_Unimplemented;
- - nfs41_ops.MRxSetVolumeInfo = nfs41_Unimplemented;
- + nfs41_ops.MRxTruncate = (PMRX_CALLDOWN)nfs41_Unimplemented;
- + nfs41_ops.MRxZeroExtend = (PMRX_CALLDOWN)nfs41_Unimplemented;
- + nfs41_ops.MRxAreFilesAliased = (PMRX_CHKFCB_CALLDOWN)nfs41_AreFilesAliased;
- + nfs41_ops.MRxQueryQuotaInfo = (PMRX_CALLDOWN)nfs41_Unimplemented;
- + nfs41_ops.MRxSetQuotaInfo = (PMRX_CALLDOWN)nfs41_Unimplemented;
- + nfs41_ops.MRxSetVolumeInfo = (PMRX_CALLDOWN)nfs41_Unimplemented;
- DbgR();
- return(STATUS_SUCCESS);
- diff --git a/sys/wmlkm.c b/sys/wmlkm.c
- index 6c7161c..37fd8db 100644
- --- a/sys/wmlkm.c
- +++ b/sys/wmlkm.c
- @@ -23,6 +23,23 @@
- #pragma hdrstop
- +/* FIXME: Why does VS22 need this, but not VC19 ? */
- +#if _MSC_VER >= 1900
- +#if defined(_WIN64) && defined(_M_X64)
- +#define _AMD64_
- +#elif defined(_WIN32) && defined(_M_IX86)
- +#define _X86_
- +#elif defined(_WIN64) && defined(_M_ARM64)
- +#define _ARM64_
- +#elif defined(_WIN32) && defined(_M_ARM)
- +#define _ARM_
- +#else
- +#error Unsupported arch
- +#endif
- +#endif /* _MSC_VER >= 1900 */
- +
- +
- +
- #include <ntddk.h>
- #include <ntdef.h>
- #define LPVOID PVOID64 // BUG - need to find include for this
ms-nfs41-client VC22 support
Posted by Anonymous on Tue 8th Oct 2024 17:05
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.