Skip to content

Commit 6b2669d

Browse files
committed
update
1 parent 8bdbfb3 commit 6b2669d

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

DLL_Injection2/src/DLLInjection2/DLLInjection2/file_mapping.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ FileMapping::FileMapping(PCWSTR pszFileName)
1010
assert(m_hFile != INVALID_HANDLE_VALUE);
1111

1212
DWORD dwFileSize = ::GetFileSize(m_hFile, NULL);
13-
m_hFileMapping = ::CreateFileMapping(m_hFile, NULL, PAGE_READWRITE, 0,
14-
dwFileSize + kExtraBlockSize, pszFileName);
13+
m_hFileMapping = ::CreateFileMapping(m_hFile, NULL, PAGE_READWRITE, 0, dwFileSize, pszFileName);
1514
assert(m_hFileMapping != INVALID_HANDLE_VALUE);
1615

1716
m_pFileMappingBase = ::MapViewOfFile(m_hFileMapping, FILE_MAP_WRITE, 0, 0, 0);

DLL_Injection2/src/DLLInjection2/DLLInjection2/file_mapping.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ class FileMapping
1111
PVOID GetFileMappingBase();
1212
BOOL Flush();
1313
private:
14-
const DWORD kExtraBlockSize = 4096;
1514
HANDLE m_hFile;
1615
HANDLE m_hFileMapping;
1716
PVOID m_pFileMappingBase;

0 commit comments

Comments
 (0)