33 ok(
test1.GetMappingSize() == 0,
"Expected 0, got %lu\n",
test1.GetMappingSize());
34 ok(
test3.GetMappingSize() == 0,
"Expected 0, got %lu\n",
test3.GetMappingSize());
40 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%lx\n",
hr);
47 ok(
test1.GetMappingSize() == 123,
"Expected 123, got %lu\n",
test1.GetMappingSize());
50 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%lx\n",
hr);
53 ok(
test1.GetMappingSize() == 123,
"Expected 123, got %lu\n",
test1.GetMappingSize());
55 bAlreadyExisted = 123;
57 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%lx\n",
hr);
59 ok(
test1.GetHandle() !=
NULL,
"Expected handle, got %p\n",
test1.GetHandle());
60 ok(
test1.GetMappingSize() ==
sizeof(
TestData),
"Expected sizeof(TestData), got %lu\n",
test1.GetMappingSize());
61 ok(bAlreadyExisted ==
FALSE,
"Expected FALSE, got %u\n", bAlreadyExisted);
69 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%lx\n",
hr);
71 ok(
test2.GetHandle() !=
NULL,
"Expected handle, got %p\n",
test2.GetHandle());
72 ok(
test2.GetMappingSize() ==
sizeof(
TestData),
"Expected sizeof(TestData), got %lu\n",
test2.GetMappingSize());
76 ok(
test1.GetHandle() !=
NULL,
"Expected handle, got %p\n",
test1.GetHandle());
77 ok(
test1.GetMappingSize() ==
sizeof(
TestData),
"Expected sizeof(TestData), got %lu\n",
test1.GetMappingSize());
80 ok(
test1.GetData() !=
test2.GetData(),
"Expected different ptrs\n");
81 ok(
test1.GetHandle() !=
test2.GetHandle(),
"Expected different handles\n");
87 ok(t1->
data[0] == 0x35353535,
"Expected 0x35353535, got 0x%x\n", t1->
data[0]);
88 ok(t2->
data[0] == 0x35353535,
"Expected 0x35353535, got 0x%x\n", t2->
data[0]);
90 t1->
data[0] = 0xbeefbeef;
91 ok(t1->
data[0] == (
int)0xbeefbeef,
"Expected 0xbeefbeef, got 0x%x\n", t1->
data[0]);
92 ok(t2->
data[0] == (
int)0xbeefbeef,
"Expected 0xbeefbeef, got 0x%x\n", t2->
data[0]);
99 ok(
test3.GetMappingSize() ==
sizeof(
TestData),
"Expected sizeof(TestData), got %lu\n",
test3.GetMappingSize());
102 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%lx\n",
hr);
104 ok(
test2.GetHandle() ==
NULL,
"Expected NULL, got %p\n",
test2.GetHandle());
105 ok(
test2.GetMappingSize() ==
sizeof(
TestData),
"Expected sizeof(TestData), got %lu\n",
test2.GetMappingSize());
107 bAlreadyExisted = 123;
112 ok(
test2.GetHandle() ==
NULL,
"Expected NULL, got %p\n",
test2.GetHandle());
113 ok(
test2.GetMappingSize() ==
sizeof(
TestData),
"Expected sizeof(TestData), got %lu\n",
test2.GetMappingSize());
114 ok(bAlreadyExisted ==
TRUE,
"Expected TRUE, got %u\n", bAlreadyExisted);
116 bAlreadyExisted = 123;
118 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%lx\n",
hr);
120 ok(
test2.GetHandle() !=
NULL,
"Expected handle, got %p\n",
test2.GetHandle());
121 ok(
test2.GetMappingSize() ==
sizeof(
TestData),
"Expected sizeof(TestData), got %lu\n",
test2.GetMappingSize());
122 ok(bAlreadyExisted ==
TRUE,
"Expected TRUE, got %u\n", bAlreadyExisted);
125 ok(
test1.GetData() !=
test2.GetData(),
"Expected different ptrs\n");
126 ok(
test1.GetHandle() !=
test2.GetHandle(),
"Expected different handles\n");
131 ok(t1->
data[0] == (
int)0xbeefbeef,
"Expected 0xbeefbeef, got 0x%x\n", t1->
data[0]);
132 ok(t2->
data[0] == (
int)0xbeefbeef,
"Expected 0xbeefbeef, got 0x%x\n", t2->
data[0]);
134 t1->
data[0] = 0xdeaddead;
135 ok(t1->
data[0] == (
int)0xdeaddead,
"Expected 0xdeaddead, got 0x%x\n", t1->
data[0]);
136 ok(t2->
data[0] == (
int)0xdeaddead,
"Expected 0xdeaddead, got 0x%x\n", t2->
data[0]);
159 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%lx\n",
hr);
161 ok(
test1.GetHandle() !=
NULL,
"Expected handle, got %p\n",
test1.GetHandle());
165 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%lx\n",
hr);
167 ok(
test2.GetHandle() !=
NULL,
"Expected handle, got %p\n",
test2.GetHandle());
172 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%lx\n",
hr);
174 ok(
test1.GetHandle() ==
NULL,
"Expected NULL, got %p\n",
test1.GetHandle());
178 ok(
hr ==
S_OK,
"Expected S_OK, got 0x%lx\n",
hr);
180 ok(
test1.GetHandle() !=
NULL,
"Expected handle, got %p\n",
test1.GetHandle());
181 ok(
test1.GetMappingSize() == 0x1000,
"Expected 0x1000, got %lu\n",
test1.GetMappingSize());
static void test_SharedMem()
static void test_FileMapping()
#define INVALID_HANDLE_VALUE
DWORD WINAPI GetFileSize(HANDLE hFile, LPDWORD lpFileSizeHigh)
DWORD WINAPI GetModuleFileNameW(HINSTANCE hModule, LPWSTR lpFilename, DWORD nSize)
_Must_inspect_result_ _Out_ PLARGE_INTEGER FileSize
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define ERROR_FILE_NOT_FOUND
#define PAGE_EXECUTE_READ
#define IMAGE_DOS_SIGNATURE
#define offsetof(TYPE, MEMBER)
#define FILE_MAP_ALL_ACCESS
#define HRESULT_FROM_WIN32(x)
#define ERROR_MAPPED_ALIGNMENT