libwinpr-memory: add missing definitions

This commit is contained in:
Marc-André Moreau 2014-01-31 20:48:31 -05:00
parent 80449cd2c5
commit 6365880f4d
3 changed files with 49 additions and 0 deletions

View File

@ -102,6 +102,42 @@
#define FILE_FLAG_OPEN_NO_RECALL 0x00100000
#define FILE_FLAG_FIRST_PIPE_INSTANCE 0x00080000
#define PAGE_NOACCESS 0x00000001
#define PAGE_READONLY 0x00000002
#define PAGE_READWRITE 0x00000004
#define PAGE_WRITECOPY 0x00000008
#define PAGE_EXECUTE 0x00000010
#define PAGE_EXECUTE_READ 0x00000020
#define PAGE_EXECUTE_READWRITE 0x00000040
#define PAGE_EXECUTE_WRITECOPY 0x00000080
#define PAGE_GUARD 0x00000100
#define PAGE_NOCACHE 0x00000200
#define PAGE_WRITECOMBINE 0x00000400
#define MEM_COMMIT 0x00001000
#define MEM_RESERVE 0x00002000
#define MEM_DECOMMIT 0x00004000
#define MEM_RELEASE 0x00008000
#define MEM_FREE 0x00010000
#define MEM_PRIVATE 0x00020000
#define MEM_MAPPED 0x00040000
#define MEM_RESET 0x00080000
#define MEM_TOP_DOWN 0x00100000
#define MEM_WRITE_WATCH 0x00200000
#define MEM_PHYSICAL 0x00400000
#define MEM_4MB_PAGES 0x80000000
#define MEM_IMAGE SEC_IMAGE
#define SEC_NO_CHANGE 0x00400000
#define SEC_FILE 0x00800000
#define SEC_IMAGE 0x01000000
#define SEC_VLM 0x02000000
#define SEC_RESERVE 0x04000000
#define SEC_COMMIT 0x08000000
#define SEC_NOCACHE 0x10000000
#define SEC_WRITECOMBINE 0x40000000
#define SEC_LARGE_PAGES 0x80000000
#define SECTION_MAP_EXECUTE_EXPLICIT 0x00020
#define SECTION_EXTEND_SIZE 0x00010
#define SECTION_MAP_READ 0x00004

View File

@ -58,6 +58,14 @@ WINPR_API BOOL UnmapViewOfFile(LPCVOID lpBaseAddress);
}
#endif
#ifdef UNICODE
#define CreateFileMapping CreateFileMappingW
#define OpenFileMapping OpenFileMappingW
#else
#define CreateFileMapping CreateFileMappingA
#define OpenFileMapping OpenFileMappingA
#endif
#endif
#endif /* WINPR_MEMORY_H */

View File

@ -81,6 +81,11 @@
HANDLE CreateFileMappingA(HANDLE hFile, LPSECURITY_ATTRIBUTES lpAttributes, DWORD flProtect,
DWORD dwMaximumSizeHigh, DWORD dwMaximumSizeLow, LPCSTR lpName)
{
if (hFile != INVALID_HANDLE_VALUE)
{
return NULL; /* not yet implemented */
}
return NULL;
}