Pipes: Sample of Client/Server Pipes

Click to open or copy the files for the Pipes sample.

This sample demonstrates how to write a program that uses pipes for transferring data between the client and the server. The client sends a file to the server using pipes. The server then "encodes" the data by adding 1 to every element in the file, and then sends the file back using pipes. The pipe used in this sample program is a in/out pipe.

This program also allows the user to compile either for UNICIODE or ANSI.

Main Files

File Description
Pipe.idl Interface definition language file
Pipe.acf Attribute configuration file
Pipec.c Client main program
Pipes.c Server main program
Common.h Common header file for all the files
Pipeproc.c Remote procedures
Makefile Nmake file to build 32-bit client and server application for ANSI characters.
Makefile.uni Nmake file to build 32-bit client and server application for UNICODE characters.

Building SDK Samples

This sample uses the following keywords:

_tcsclen; _tcscmp; _tcscpy; _tfopen; _tprintf; cleanupserver; commandlinetoargvw; defined; exit; exit_if_fail; fclose; fread; free; fseek; fwrite; getcommandline; malloc; midl_user_allocate; midl_user_free; ndrclientcall2; ndrclientinitializenew; ndrfcshort; ndrfreebuffer; ndrgetbuffer; ndrsendreceive; ndrserverinitializenew; pipe_sample_shutdown; pipealloc; pipepull; pipepush; pull; push; rpcbindingfromstringbinding; rpcexcept; rpcexceptioncode; rpcmgmtstopserverlistening; rpcserverlisten; rpcserverregisterif; rpcserverunregisterif; rpcserveruseprotseqep; rpcstringbindingcompose; scramblefile; shutdown; text; usage; va_start