169 Size.QuadPart = nMappingSize;
174 if (pbAlreadyExisted)
269template <
typename T =
char>
274 operator T*()
const noexcept
276 return reinterpret_cast<T*
>(
GetData());
CAtlFileMappingBase() noexcept
~CAtlFileMappingBase() noexcept
HRESULT OpenMapping(LPCTSTR szName, SIZE_T nMappingSize, ULONGLONG nOffset=0, DWORD dwViewDesiredAccess=FILE_MAP_ALL_ACCESS) noexcept
CAtlFileMappingBase(CAtlFileMappingBase &orig)
CAtlFileMappingBase & operator=(CAtlFileMappingBase &orig)
DWORD m_dwViewDesiredAccess
HRESULT MapFile(HANDLE hFile, SIZE_T nMappingSize=0, ULONGLONG nOffset=0, DWORD dwMappingProtection=PAGE_READONLY, DWORD dwViewDesiredAccess=FILE_MAP_READ) noexcept
SIZE_T GetMappingSize() noexcept
HRESULT MapSharedMem(SIZE_T nMappingSize, LPCTSTR szName, BOOL *pbAlreadyExisted=NULL, LPSECURITY_ATTRIBUTES lpsa=NULL, DWORD dwMappingProtection=PAGE_READWRITE, DWORD dwViewDesiredAccess=FILE_MAP_ALL_ACCESS) noexcept
void * GetData() const noexcept
HRESULT CopyFrom(CAtlFileMappingBase &orig) noexcept
#define INVALID_HANDLE_VALUE
#define GetCurrentProcess()
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
BOOL WINAPI DuplicateHandle(IN HANDLE hSourceProcessHandle, IN HANDLE hSourceHandle, IN HANDLE hTargetProcessHandle, OUT LPHANDLE lpTargetHandle, IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN DWORD dwOptions)
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
#define ERROR_ALREADY_EXISTS
HRESULT AtlHresultFromLastError() noexcept
static const WCHAR szName[]
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
DWORD WINAPI GetLastError(void)
#define CreateFileMapping
#define FILE_MAP_ALL_ACCESS
#define DUPLICATE_SAME_ACCESS