#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <windows.h>
#include <tchar.h>
Go to the source code of this file.
◆ BUFSIZE
◆ PIPE_TIMEOUT
◆ GetAnswerToRequest()
◆ InstanceThread()
Definition at line 87 of file npserver.c.
88{
91 DWORD cbBytesRead, cbReplyBytes, cbWritten;
94
96 while (1)
97 {
99 chRequest,
101 &cbBytesRead,
103 if (!fSuccess || cbBytesRead == 0)
104 break;
105
107
109 chReply,
110 cbReplyBytes,
111 &cbWritten,
113 if (!fSuccess || cbReplyBytes != cbWritten)
114 break;
115 }
116
120}
#define ReadFile(a, b, c, d, e)
BOOL WINAPI FlushFileBuffers(IN HANDLE hFile)
BOOL WINAPI WriteFile(_In_ HANDLE hFile, _In_reads_bytes_opt_(nNumberOfBytesToWrite) LPCVOID lpBuffer, _In_ DWORD nNumberOfBytesToWrite, _Out_opt_ LPDWORD lpNumberOfBytesWritten, _Inout_opt_ LPOVERLAPPED lpOverlapped)
BOOL WINAPI DisconnectNamedPipe(HANDLE hNamedPipe)
VOID GetAnswerToRequest(LPTSTR lpRequest, LPTSTR lpReply, LPDWORD lpcbReplyBytes)
Referenced by main().
◆ main()
hosttype.c Copyright (C) 2002 by Brian Palmer brian.nosp@m.p@sg.nosp@m.inet..nosp@m.com
Definition at line 31 of file npserver.c.
32{
36 LPTSTR lpszPipename =
TEXT(
"\\\\.\\pipe\\mynamedpipe");
37
38
39
51 {
52 printf(
"CreateNamedPipe() failed\n");
53 return 0;
54 }
55
59 if (fConnected)
60 {
61 printf(
"Pipe connected!\n");
62
64
65#if 0
67 0,
70 0,
74#endif
75 }
76 else
77 {
78
79 }
80
81
83
84 return 0;
85}
#define INVALID_HANDLE_VALUE
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE
BOOL WINAPI ConnectNamedPipe(IN HANDLE hNamedPipe, IN LPOVERLAPPED lpOverlapped)
VOID MyErrExit(LPTSTR Message)
VOID InstanceThread(LPVOID)
DWORD WINAPI GetLastError(void)
#define PIPE_ACCESS_DUPLEX
#define PIPE_READMODE_MESSAGE
#define PIPE_TYPE_MESSAGE
#define PIPE_UNLIMITED_INSTANCES
#define ERROR_PIPE_CONNECTED
◆ MyErrExit()
Definition at line 19 of file npserver.c.
20{
21
24}
int puts(const char *string)
VOID WINAPI ExitProcess(IN UINT uExitCode)
static const WCHAR Message[]
Referenced by main().
◆ xx
Definition at line 29 of file npserver.c.
Referenced by __remainder_piby2(), StringTest::c_str(), CC_WMCommand(), StringTest::data(), FT_Matrix_Invert(), FT_Matrix_Multiply(), FT_Matrix_Multiply_Scaled(), gl_rotation_matrix(), HLPFILE_RtfAddText(), SConnect(), tan_piby4(), TT_Load_Composite_Glyph(), ui_draw_glyph(), ui_patblt(), vncAndBlitFrom(), vncCopyBlitFromNoEncode(), vncGetRect(), vncSetRect(), vncTransBlitFrom(), and vncXorBlitFrom().