Split kernel32 into separate files (part 3)

This commit is contained in:
2025-10-02 01:02:26 -06:00
parent fa3ed4893a
commit 2cbd624119
18 changed files with 1153 additions and 994 deletions

View File

@@ -19,10 +19,6 @@
#include <utility>
#include <vector>
namespace kernel32 {
int64_t getFileSize(HANDLE hFile);
}
namespace {
constexpr size_t kVirtualAllocationGranularity = 64 * 1024;
@@ -285,7 +281,7 @@ HANDLE WIN_FUNC CreateFileMappingA(HANDLE hFile, LPSECURITY_ATTRIBUTES lpFileMap
}
mapping->fd = dupFd;
if (size == 0) {
int64_t fileSize = getFileSize(hFile);
int64_t fileSize = getFileSizeFromHandle(hFile);
if (fileSize < 0) {
closeMappingIfPossible(mapping);
return nullptr;