summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Lichtenberg (170957) <[email protected]>2024-03-21 16:36:48 -0700
committerJakob Lichtenberg (170957) <[email protected]>2024-03-21 16:36:48 -0700
commitbc58af4a85ce728e39954044b8c3f55e7144867d (patch)
treecdf518c2c8e31d440ecd1336a26cde63876712da
parente113cfb839c99b101812bbf0984d2d8f1ae6d26c (diff)
parentb5a831819b45104d389df709e6bc00ee117906f3 (diff)
Merge branch 'develop' into user/seromero/network-wlan-arm64user/seromero/network-wlan-arm64
-rw-r--r--Build-SampleSet.ps12
-rw-r--r--Directory.Build.props10
-rw-r--r--network/wlan/WDI/HEADER/PlatformDef.h32
-rw-r--r--network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.c408
-rw-r--r--packages.config10
5 files changed, 240 insertions, 222 deletions
diff --git a/Build-SampleSet.ps1 b/Build-SampleSet.ps1
index a93548b7..c0c2e5d1 100644
--- a/Build-SampleSet.ps1
+++ b/Build-SampleSet.ps1
@@ -65,7 +65,7 @@ if (-not $env:GITHUB_REPOSITORY -eq '') {
#
elseif(Test-Path(".\packages")) {
$build_environment=("NuGet")
- $build_number=26080
+ $build_number=26085
}
#
# EWDK sets environment variable BuildLab. For example 'ni_release_svc_prod1.22621.2428'.
diff --git a/Directory.Build.props b/Directory.Build.props
index 1f087a50..14afc64c 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,7 +1,7 @@
<Project>
-<Import Project="packages\Microsoft.Windows.WDK.x64.10.0.26080.1-preview.ge-release\build\native\Microsoft.Windows.WDK.x64.props" Condition="Exists('packages\Microsoft.Windows.WDK.x64.10.0.26080.1-preview.ge-release\build\native\Microsoft.Windows.WDK.x64.props') and '$(Platform)' == 'x64'"/>
-<Import Project="packages\Microsoft.Windows.WDK.arm64.10.0.26080.1-preview.ge-release\build\native\Microsoft.Windows.WDK.arm64.props" Condition="Exists('packages\Microsoft.Windows.WDK.arm64.10.0.26080.1-preview.ge-release\build\native\Microsoft.Windows.WDK.arm64.props') and '$(Platform)' == 'ARM64'"/>
-<Import Project="packages\Microsoft.Windows.SDK.CPP.x64.10.0.26080.1-preview.ge-release\build\native\Microsoft.Windows.SDK.cpp.x64.props" Condition="Exists('packages\Microsoft.Windows.SDK.CPP.x64.10.0.26080.1-preview.ge-release\build\native\Microsoft.Windows.SDK.cpp.x64.props') and '$(Platform)' == 'x64'"/>
-<Import Project="packages\Microsoft.Windows.SDK.CPP.arm64.10.0.26080.1-preview.ge-release\build\native\Microsoft.Windows.SDK.cpp.arm64.props" Condition="Exists('packages\Microsoft.Windows.SDK.CPP.arm64.10.0.26080.1-preview.ge-release\build\native\Microsoft.Windows.SDK.cpp.arm64.props') and '$(Platform)' == 'ARM64'"/>
-<Import Project="packages\Microsoft.Windows.SDK.CPP.10.0.26080.1-preview.ge-release\build\native\Microsoft.Windows.SDK.cpp.props" Condition="Exists('packages\Microsoft.Windows.SDK.CPP.10.0.26080.1-preview.ge-release\build\native\Microsoft.Windows.SDK.cpp.props')"/>
+<Import Project="packages\Microsoft.Windows.WDK.x64.10.0.26085.1-preview.ge-release\build\native\Microsoft.Windows.WDK.x64.props" Condition="Exists('packages\Microsoft.Windows.WDK.x64.10.0.26085.1-preview.ge-release\build\native\Microsoft.Windows.WDK.x64.props') and '$(Platform)' == 'x64'"/>
+<Import Project="packages\Microsoft.Windows.WDK.arm64.10.0.26085.1-preview.ge-release\build\native\Microsoft.Windows.WDK.arm64.props" Condition="Exists('packages\Microsoft.Windows.WDK.arm64.10.0.26085.1-preview.ge-release\build\native\Microsoft.Windows.WDK.arm64.props') and '$(Platform)' == 'ARM64'"/>
+<Import Project="packages\Microsoft.Windows.SDK.CPP.x64.10.0.26085.1-preview.ge-release\build\native\Microsoft.Windows.SDK.cpp.x64.props" Condition="Exists('packages\Microsoft.Windows.SDK.CPP.x64.10.0.26085.1-preview.ge-release\build\native\Microsoft.Windows.SDK.cpp.x64.props') and '$(Platform)' == 'x64'"/>
+<Import Project="packages\Microsoft.Windows.SDK.CPP.arm64.10.0.26085.1-preview.ge-release\build\native\Microsoft.Windows.SDK.cpp.arm64.props" Condition="Exists('packages\Microsoft.Windows.SDK.CPP.arm64.10.0.26085.1-preview.ge-release\build\native\Microsoft.Windows.SDK.cpp.arm64.props') and '$(Platform)' == 'ARM64'"/>
+<Import Project="packages\Microsoft.Windows.SDK.CPP.10.0.26085.1-preview.ge-release\build\native\Microsoft.Windows.SDK.cpp.props" Condition="Exists('packages\Microsoft.Windows.SDK.CPP.10.0.26085.1-preview.ge-release\build\native\Microsoft.Windows.SDK.cpp.props')"/>
</Project>
diff --git a/network/wlan/WDI/HEADER/PlatformDef.h b/network/wlan/WDI/HEADER/PlatformDef.h
index cad6fb7a..a8f4fb55 100644
--- a/network/wlan/WDI/HEADER/PlatformDef.h
+++ b/network/wlan/WDI/HEADER/PlatformDef.h
@@ -813,42 +813,42 @@ PlatformRequestPreAuthentication(
RT_STATUS
PlatformReadFile(
- IN PVOID Adapter,
- IN ps1Byte szFileName,
- IN OUT pu1Byte pBufOfLines,
- IN s4Byte nMaxNumLine,
- IN s4Byte nMaxByteCntLine,
- OUT ps4Byte pnNumLines
+ IN PVOID Adapter,
+ IN UNICODE_STRING* fileName,
+ IN OUT pu1Byte pBufOfLines,
+ IN s4Byte nMaxNumLine,
+ IN s4Byte nMaxByteCntLine,
+ OUT ps4Byte pnNumLinesRead
);
RT_STATUS
PlatformOpenFile(
- IN PVOID Adapter,
- IN ps1Byte szFileName,
- IN OUT PRT_FILE_HANDLER pFileHandler
+ IN UNICODE_STRING* fileName,
+ IN OUT HANDLE* fileHandle
);
RT_STATUS
PlatformMapFile(
- IN OUT PRT_FILE_HANDLER pFileHandler
+ IN OUT HANDLE* fileHandle,
+ OUT u1Byte* contentBuffer,
+ OUT s4Byte* contentBufferLength
);
VOID
PlatformUnMapFile(
- IN OUT PRT_FILE_HANDLER pFileHandler
+ IN OUT u1Byte* contentBuffer
);
VOID
PlatformCloseFile(
- IN OUT PRT_FILE_HANDLER pFileHandler
+ IN OUT HANDLE* fileHandle
);
RT_STATUS
PlatformReadAndMapFile(
- IN PVOID Adapter,
- IN ps1Byte szFileName,
- IN OUT pu1Byte pOutFile,
- IN OUT pu4Byte UNALIGNED pFileSize
+ IN UNICODE_STRING* fileName,
+ OUT u1Byte* outFileBuffer,
+ OUT u4Byte* outFileBufferLength
);
BOOLEAN
diff --git a/network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.c b/network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.c
index d122f0c0..a8eb835d 100644
--- a/network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.c
+++ b/network/wlan/WDI/PLATFORM/NDIS6/Ndis6Common.c
@@ -207,85 +207,105 @@ ParseFileBufToLines(
// which is a 2-dimention array, for example,
// u1Byte pBufOfLines[nMaxNumLine][nMaxByteCntLine].
//
-// Note:
-// In NDIS5, the file to open shall be placed at the directory the same as
-// driver binary.
-//
RT_STATUS
PlatformReadFile(
- IN PVOID Adapter,
- IN ps1Byte szFileName,
- IN OUT pu1Byte pBufOfLines,
- IN s4Byte nMaxNumLine,
- IN s4Byte nMaxByteCntLine,
- OUT ps4Byte pnNumLinesRead
+ IN PVOID Adapter,
+ IN UNICODE_STRING* fileName,
+ IN OUT pu1Byte pBufOfLines,
+ IN s4Byte nMaxNumLine,
+ IN s4Byte nMaxByteCntLine,
+ OUT ps4Byte pnNumLinesRead
)
{
- RT_STATUS rtStatus = RT_STATUS_FAILURE;
- NDIS_STRING NdisStrFileName;
- NDIS_PHYSICAL_ADDRESS ndisPhyAddr;
- NDIS_STATUS ndisStatus;
- NDIS_HANDLE hFileHandle;
- UINT ulFileLength;
- pu1Byte pMappedFile = NULL;
+ RT_STATUS rtStatus = RT_STATUS_FAILURE;
+ OBJECT_ATTRIBUTES objectAttributes;
+ HANDLE fileHandle;
+ IO_STATUS_BLOCK iostatBlock;
+ NTSTATUS ntStatus;
- // Check input parameters.
- if(szFileName == NULL)
- {
- RT_TRACE(COMP_INIT, DBG_WARNING, ("PlatformReadFile(): szFileName should not be NULL!\n"));
- return rtStatus;
- }
+ // Check Input parameters.
if(pBufOfLines == NULL)
{
RT_TRACE(COMP_INIT, DBG_WARNING, ("PlatformReadFile(): pBufOfLines should not be NULL!\n"));
return rtStatus;
}
- // Convert szFileName to NDIS_STRING.
- NdisInitializeString(&NdisStrFileName, (PUCHAR)szFileName);
- if(NdisStrFileName.Buffer != NULL && NdisStrFileName.Length > 0)
- {
- // Open the file specified.
- ndisPhyAddr.LowPart = ndisPhyAddr.HighPart = -1;
- NdisOpenFile(&ndisStatus,
- &hFileHandle,
- &ulFileLength,
- &NdisStrFileName,
- ndisPhyAddr);
- if(ndisStatus == NDIS_STATUS_SUCCESS)
- {
- // Map the file into memory.
- NdisMapFile(&ndisStatus, (PVOID *)(&pMappedFile), hFileHandle);
- if(ndisStatus == NDIS_STATUS_SUCCESS)
- {
- // Read the file into pBufOfLines.
- ParseFileBufToLines(Adapter, pMappedFile, ulFileLength, pBufOfLines, nMaxNumLine, nMaxByteCntLine, pnNumLinesRead);
-
- // Return Success only when Config Success
- rtStatus = RT_STATUS_SUCCESS;
-
- // Relase the memory for mapping the file.
- NdisUnmapFile(hFileHandle);
+ // Initialize the object attributes of the file we want to open
+ InitializeObjectAttributes(
+ &objectAttributes,
+ fileName,
+ OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE,
+ NULL, // RootDirectory
+ NULL // Default Security
+ );
+
+ // Open the file using the object attributes to get a Handle
+ ntStatus = ZwOpenFile(
+ &fileHandle,
+ GENERIC_READ,
+ &objectAttributes,
+ &iostatBlock,
+ 0, // Do not share the file
+ FILE_NON_DIRECTORY_FILE
+ );
+
+ if (NT_SUCCESS(ntStatus)) {
+ FILE_STANDARD_INFORMATION fileInformation = { 0 };
+
+ // Get the file information to know the size we need to alloc
+ ntStatus = ZwQueryInformationFile(
+ fileHandle,
+ &iostatBlock,
+ &fileInformation,
+ sizeof(fileInformation),
+ FileStandardInformation
+ );
+
+ if (NT_SUCCESS(ntStatus)) {
+ u1Byte* buffer = NULL;
+ s4Byte bufferLength = (s4Byte)fileInformation.EndOfFile.QuadPart;
+
+ // Try to allocate space to read the file
+ buffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, bufferLength, 'frP');
+ if (buffer) {
+
+ // If alloc was successful, then read the file
+ ntStatus = ZwReadFile(
+ fileHandle,
+ NULL,
+ NULL,
+ NULL,
+ &iostatBlock,
+ buffer,
+ bufferLength,
+ 0, // No offset
+ NULL
+ );
+
+ if (NT_SUCCESS(ntStatus)) {
+ // Read the buffer into pBufOfLines.
+ ParseFileBufToLines(Adapter, buffer, bufferLength, pBufOfLines, nMaxNumLine, nMaxByteCntLine, pnNumLinesRead);
+ rtStatus = RT_STATUS_SUCCESS;
+ }
+ else {
+ RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to read file, ntStatus: %#X\n", ntStatus));
+ }
+
+ ExFreePool(buffer);
+
}
- else
- {
- RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to map the file, %s!, ndisStatus: %#X\n", szFileName, ndisStatus));
+ else {
+ RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to allocate space for file!\n"));
}
-
- // Close the file.
- NdisCloseFile(hFileHandle);
}
- else
- {
- RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to open the file, %s!, ndisStatus: %#X\n", szFileName, ndisStatus));
+ else {
+ RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to read file attributes!, ntStatus: %#X\n", ntStatus));
}
-
- // Release the NDIS_STRING allocated via NdisInitializeString().
- NdisFreeString(NdisStrFileName);
+
+ ZwClose(fileHandle);
}
- else
- {
- RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): NdisInitializeString() failed! szFileName: %s\n", szFileName));
+ else {
+ RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to open the file!, ntStatus: %#X\n", ntStatus));
}
return rtStatus;
@@ -293,51 +313,39 @@ PlatformReadFile(
RT_STATUS
PlatformOpenFile(
- IN PVOID Adapter,
- IN ps1Byte szFileName,
- IN OUT PRT_FILE_HANDLER pFileHandler
+ IN UNICODE_STRING* fileName,
+ IN OUT HANDLE* fileHandle
)
{
- RT_STATUS rtStatus = RT_STATUS_FAILURE;
- NDIS_STRING NdisStrFileName;
- NDIS_PHYSICAL_ADDRESS ndisPhyAddr;
- NDIS_STATUS ndisStatus;
- pu1Byte pMappedFile = NULL;
+ RT_STATUS rtStatus = RT_STATUS_FAILURE;
+ OBJECT_ATTRIBUTES objectAttributes;
+ IO_STATUS_BLOCK iostatBlock;
+ NTSTATUS ntStatus;
-
- // Check input parameters.
- if(szFileName == NULL)
- {
- RT_TRACE(COMP_INIT, DBG_LOUD, ("PlatformOpenFile(): szFileName should not be NULL!\n"));
- return rtStatus;
- }
+ // Initialize the object attributes of the file we want to open
+ InitializeObjectAttributes(
+ &objectAttributes,
+ fileName,
+ OBJ_KERNEL_HANDLE | OBJ_CASE_INSENSITIVE,
+ NULL, // RootDirectory
+ NULL // Default Security
+ );
- // Convert szFileName to NDIS_STRING.
- NdisInitializeString(&NdisStrFileName, (PUCHAR)szFileName);
- if(NdisStrFileName.Buffer != NULL && NdisStrFileName.Length > 0)
- {
- // Open the file specified.
- ndisPhyAddr.LowPart = ndisPhyAddr.HighPart = -1;
- NdisOpenFile(&ndisStatus,
- &(pFileHandler->FileHandler),
- &(pFileHandler->FileLength),
- &NdisStrFileName,
- ndisPhyAddr);
-
- NdisFreeString(NdisStrFileName);
- if(ndisStatus == NDIS_STATUS_SUCCESS)
- {
- rtStatus = RT_STATUS_SUCCESS;
- }
- else
- {
- RT_TRACE(COMP_INIT, DBG_LOUD, ("PlatformOpenFile(): failed to open the file, %s!, ndisStatus: %#X\n", szFileName, ndisStatus));
- }
-
+ // Open the file using the object attributes to get a Handle
+ ntStatus = ZwOpenFile(
+ fileHandle,
+ GENERIC_READ,
+ &objectAttributes,
+ &iostatBlock,
+ 0, // Do not share the file
+ FILE_NON_DIRECTORY_FILE
+ );
+
+ if (NT_SUCCESS(ntStatus)) {
+ rtStatus = RT_STATUS_SUCCESS;
}
- else
- {
- RT_TRACE(COMP_INIT, DBG_LOUD, ("PlatformOpenFile(): NdisInitializeString() failed! szFileName: %s\n", szFileName));
+ else {
+ RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to open the file!, ntStatus: %#X, fileName: %wZ\n", ntStatus, fileName));
}
return rtStatus;
@@ -345,20 +353,66 @@ PlatformOpenFile(
RT_STATUS
PlatformMapFile(
- IN OUT PRT_FILE_HANDLER pFileHandler
+ IN OUT HANDLE* fileHandle,
+ OUT u1Byte* contentBuffer,
+ OUT s4Byte* contentBufferLength
)
{
- RT_STATUS rtStatus = RT_STATUS_FAILURE;
- NDIS_STATUS ndisStatus;
-
- // Map the file into memory.
- NdisMapFile(&ndisStatus, (PVOID *)(&(pFileHandler->MappedFile)), pFileHandler->FileHandler);
- if(ndisStatus == NDIS_STATUS_SUCCESS) {
- rtStatus = RT_STATUS_SUCCESS;
+ RT_STATUS rtStatus = RT_STATUS_FAILURE;
+ OBJECT_ATTRIBUTES objectAttributes;
+ IO_STATUS_BLOCK iostatBlock;
+ NTSTATUS ntStatus;
+
+
+ FILE_STANDARD_INFORMATION fileInformation = { 0 };
+
+ // Get the file information to know the size we need to alloc
+ ntStatus = ZwQueryInformationFile(
+ *fileHandle,
+ &iostatBlock,
+ &fileInformation,
+ sizeof(fileInformation),
+ FileStandardInformation
+ );
+
+ if (NT_SUCCESS(ntStatus)) {
+ u1Byte* buffer = NULL;
+ s4Byte bufferLength = (s4Byte)fileInformation.EndOfFile.QuadPart;
+
+ // Try to allocate space to read the file
+ buffer = ExAllocatePool2(POOL_FLAG_NON_PAGED, bufferLength, 'frP');
+ if (buffer) {
+
+ // If alloc was successful, then read the file
+ ntStatus = ZwReadFile(
+ fileHandle,
+ NULL,
+ NULL,
+ NULL,
+ &iostatBlock,
+ buffer,
+ bufferLength,
+ 0, // No offset
+ NULL
+ );
+
+ if (NT_SUCCESS(ntStatus)) {
+ contentBuffer = buffer;
+ *contentBufferLength = bufferLength;
+ rtStatus = RT_STATUS_SUCCESS;
+ }
+ else {
+ ExFreePool(buffer);
+ RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to read file, ntStatus: %#X\n", ntStatus));
+ }
+ }
+ else {
+ RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to allocate space for file!\n"));
+ }
}
else {
- RT_TRACE(COMP_INIT, DBG_LOUD, ("PlatformMapFile(): failed to map the file!, ndisStatus: %#X\n", ndisStatus));
+ RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadFile(): failed to read file attributes!, ntStatus: %#X\n", ntStatus));
}
return rtStatus;
@@ -366,22 +420,65 @@ PlatformMapFile(
VOID
PlatformUnMapFile(
- IN OUT PRT_FILE_HANDLER pFileHandler
+ IN OUT u1Byte* contentBuffer
)
{
// Relase the memory for mapping the file.
- NdisUnmapFile(pFileHandler->FileHandler);
+ ExFreePool(contentBuffer);
}
+
VOID
PlatformCloseFile(
- IN OUT PRT_FILE_HANDLER pFileHandler
+ IN OUT HANDLE* fileHandle
)
{
// Relase the memory for mapping the file.
- NdisCloseFile(pFileHandler->FileHandler);
+ ZwClose(fileHandle);
+}
+
+//
+// Description:
+// Open the file specifed and copy the file into an byte buffer,
+//
+RT_STATUS
+PlatformReadAndMapFile(
+ IN UNICODE_STRING* fileName,
+ OUT u1Byte* outFileBuffer,
+ OUT u4Byte* outFileBufferLength
+)
+{
+ RT_STATUS rtStatus = RT_STATUS_FAILURE;
+ HANDLE fileHandle;
+ RT_STATUS callStatus;
+
+ callStatus = PlatformOpenFile(fileName, &fileHandle);
+
+ if (callStatus == RT_STATUS_SUCCESS) {
+ u1Byte* fileBuffer = NULL;
+ u4Byte* fileBufferLength = NULL;
+
+ callStatus = PlatformMapFile(&fileHandle, fileBuffer, fileBufferLength);
+
+ if (callStatus == RT_STATUS_SUCCESS) {
+ outFileBuffer = fileBuffer;
+ outFileBufferLength = fileBufferLength;
+ rtStatus = RT_STATUS_SUCCESS;
+ }
+ else {
+ RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadAndMapFile(): failed to map file!, rtStatus: %#X\n", callStatus));
+ }
+
+ PlatformCloseFile(fileHandle);
+ }
+ else {
+ RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadAndMapFile(): failed to open the file!, rtStatus: %#X\n", callStatus));
+ }
+
+ return rtStatus;
}
+
//
// Description:
// Indication for PHY power state changed.
@@ -2722,85 +2819,6 @@ N6InitializeNative80211MIBs(
Adapter->pNdisCommon->PrivacyExemptionEntrieNum = 0;
}
-//
-// Description:
-// Open the file specifed and copy the file into an array,
-//
-RT_STATUS
-PlatformReadAndMapFile(
- IN PVOID Adapter,
- IN ps1Byte szFileName,
- IN OUT pu1Byte pOutFile,
- IN OUT pu4Byte UNALIGNED pFileSize
- )
-{
- RT_STATUS rtStatus = RT_STATUS_FAILURE;
- NDIS_STRING NdisStrFileName;
- NDIS_PHYSICAL_ADDRESS ndisPhyAddr;
- NDIS_STATUS ndisStatus;
- NDIS_HANDLE hFileHandle;
- UINT ulFileLength;
- pu1Byte pMappedFile = NULL;
-
- // Check input parameters.
- if(szFileName == NULL)
- {
- RT_TRACE(COMP_INIT, DBG_WARNING, ("PlatformReadAndMapFile(): szFileName should not be NULL!\n"));
- return rtStatus;
- }
-
-
- // Convert szFileName to NDIS_STRING.
- NdisInitializeString(&NdisStrFileName, (PUCHAR)szFileName);
- if(NdisStrFileName.Buffer != NULL && NdisStrFileName.Length > 0)
- {
- // Open the file specified.
- ndisPhyAddr.LowPart = ndisPhyAddr.HighPart = -1;
- NdisOpenFile(&ndisStatus,
- &hFileHandle,
- &ulFileLength,
- &NdisStrFileName,
- ndisPhyAddr);
- if(ndisStatus == NDIS_STATUS_SUCCESS)
- {
- // Map the file into memory.
- NdisMapFile(&ndisStatus, (PVOID *)(&pMappedFile), hFileHandle);
- if(ndisStatus == NDIS_STATUS_SUCCESS)
- {
- // Copy File into array
- PlatformMoveMemory(pOutFile, pMappedFile, ulFileLength);
- *pFileSize = ulFileLength;
-
- // Return Success only when Config Success
- rtStatus = RT_STATUS_SUCCESS;
-
- // Relase the memory for mapping the file.
- NdisUnmapFile(hFileHandle);
- }
- else
- {
- RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadAndMapFile(): failed to map the file, %s!, ndisStatus: %#X\n", szFileName, ndisStatus));
- }
-
- // Close the file.
- NdisCloseFile(hFileHandle);
- }
- else
- {
- RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadAndMapFile(): failed to open the file, %s!, ndisStatus: %#X\n", szFileName, ndisStatus));
- }
-
- // Release the NDIS_STRING allocated via NdisInitializeString().
- NdisFreeString(NdisStrFileName);
- }
- else
- {
- RT_TRACE(COMP_INIT, DBG_SERIOUS, ("PlatformReadAndMapFile(): NdisInitializeString() failed! szFileName: %s\n", szFileName));
- }
-
- return rtStatus;
-}
-
//
// Description:
diff --git a/packages.config b/packages.config
index 071203ec..8ff7eabb 100644
--- a/packages.config
+++ b/packages.config
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
- <package id="Microsoft.Windows.SDK.CPP" version="10.0.26080.1-preview.ge-release" targetFramework="native" />
- <package id="Microsoft.Windows.SDK.CPP.x64" version="10.0.26080.1-preview.ge-release" targetFramework="native" />
- <package id="Microsoft.Windows.SDK.CPP.arm64" version="10.0.26080.1-preview.ge-release" targetFramework="native" />
- <package id="Microsoft.Windows.WDK.x64" version="10.0.26080.1-preview.ge-release" targetFramework="native" />
- <package id="Microsoft.Windows.WDK.arm64" version="10.0.26080.1-preview.ge-release" targetFramework="native" />
+ <package id="Microsoft.Windows.SDK.CPP" version="10.0.26085.1-preview.ge-release" targetFramework="native" />
+ <package id="Microsoft.Windows.SDK.CPP.x64" version="10.0.26085.1-preview.ge-release" targetFramework="native" />
+ <package id="Microsoft.Windows.SDK.CPP.arm64" version="10.0.26085.1-preview.ge-release" targetFramework="native" />
+ <package id="Microsoft.Windows.WDK.x64" version="10.0.26085.1-preview.ge-release" targetFramework="native" />
+ <package id="Microsoft.Windows.WDK.arm64" version="10.0.26085.1-preview.ge-release" targetFramework="native" />
</packages>