ReactOS 0.4.15-dev-7924-g5949c20
shmclt.c File Reference
#include <ddk/ntddk.h>
#include <windows.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
Include dependency graph for shmclt.c:

Go to the source code of this file.

Functions

void debug_printf (char *fmt,...)
 
int main (int argc, char *argv[])
 

Variables

HANDLE OutputHandle
 
HANDLE InputHandle
 

Function Documentation

◆ debug_printf()

void debug_printf ( char fmt,
  ... 
)

Definition at line 10 of file shmclt.c.

11{
13 char buffer[255];
14
18 va_end(args);
19}
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * va_list
Definition: acmsvcex.h:78
#define va_end(ap)
Definition: acmsvcex.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
#define NULL
Definition: types.h:112
BOOL WINAPI DECLSPEC_HOTPATCH WriteConsoleA(IN HANDLE hConsoleOutput, IN CONST VOID *lpBuffer, IN DWORD nNumberOfCharsToWrite, OUT LPDWORD lpNumberOfCharsWritten, LPVOID lpReserved)
Definition: readwrite.c:1468
GLuint buffer
Definition: glext.h:5915
int __cdecl vsprintf(char *_Dest, const char *_Format, va_list _Args)
Definition: sprintf.c:733
#define args
Definition: format.c:66
HANDLE OutputHandle
Definition: shmclt.c:7
Definition: match.c:390
Definition: dsound.c:943

◆ main()

int main ( int argc  ,
char argv[] 
)

Definition at line 23 of file shmclt.c.

24{
25 HANDLE Section;
27 char buffer[256];
28
29 printf("Shm test server\n");
30
31 Section = OpenFileMappingW (
32// PAGE_EXECUTE_READWRITE, invalid parameter
34 FALSE,
35 L"TestSection"
36 );
37 if (Section == NULL)
38 {
39 printf("Failed to open section (err=%d)", GetLastError());
40 return 1;
41 }
42
43 BaseAddress = MapViewOfFile(Section,
45 0,
46 0,
47 8192);
48 if (BaseAddress == NULL)
49 {
50 printf("Failed to map section (err=%d)\n", GetLastError());
51 return 1;
52 }
53 printf("BaseAddress %x\n", (UINT) BaseAddress);
54 printf("Copying from section\n");
56 printf("Copyed <%s>\n", buffer);
57
58// for(;;);
59 return 0;
60}
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define FALSE
Definition: types.h:117
#define MapViewOfFile
Definition: compat.h:745
HANDLE NTAPI OpenFileMappingW(IN DWORD dwDesiredAccess, IN BOOL bInheritHandle, IN LPCWSTR lpName)
Definition: filemap.c:297
#define printf
Definition: freeldr.h:93
unsigned int UINT
Definition: ndis.h:50
_In_ HANDLE _Outptr_result_bytebuffer_ ViewSize PVOID * BaseAddress
Definition: mmfuncs.h:404
#define L(x)
Definition: ntvdm.h:50
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define FILE_MAP_WRITE
Definition: winbase.h:154
#define FILE_MAP_ALL_ACCESS
Definition: winbase.h:156

Variable Documentation

◆ InputHandle

HANDLE InputHandle

Definition at line 8 of file shmclt.c.

◆ OutputHandle

HANDLE OutputHandle

Definition at line 7 of file shmclt.c.

Referenced by debug_printf().