10 void debug_printf(char* fmt
, ...)
16 vsprintf(buffer
,fmt
,args
);
17 WriteConsoleA(OutputHandle
, buffer
, strlen(buffer
), NULL
, NULL
);
23 main(int argc
, char* argv
[])
29 printf("Shm test server\n");
31 Section
= OpenFileMappingW (
32 // PAGE_EXECUTE_READWRITE, invalid parameter
39 printf("Failed to open section (err=%d)", GetLastError());
43 BaseAddress
= MapViewOfFile(Section
,
48 if (BaseAddress
== NULL
)
50 printf("Failed to map section (err=%d)\n", GetLastError());
53 printf("BaseAddress %x\n", (UINT
) BaseAddress
);
54 printf("Copying from section\n");
55 strcpy(buffer
, BaseAddress
);
56 printf("Copyed <%s>\n", buffer
);