c 2b 2b create file mapping object

Solutions on MaxInterview for c 2b 2b create file mapping object by the best coders in the world

showing results for - "c 2b 2b create file mapping object"
Paola
20 Sep 2019
1#include <Windows.h>
2#include <tchar.h>
3
4int main() {
5  	/*
6    	This creates a file mapping object that can only READ the file
7        see: https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea
8    */
9  
10	HANDLE fileHandle = CreateFile(
11        _T("combatlog.txt"),
12        GENERIC_READ,
13        FILE_SHARE_READ,
14        NULL,
15        OPEN_EXISTING,
16        FILE_ATTRIBUTE_NORMAL,
17        NULL
18    );
19}