Click to open or copy the files for the DynOut sample.
This sample demonstrates a client application managing its connection to the server through dynamic endpoints. This sample demonstrates how to allocate memory at a server for an n-byte object and pass it back to the client as an [out]-only parameter. The client then frees the memory. This technique allows the stub to call the server without knowing in advance how much data will be returned.
Main Files
File | Description |
Readme.txt | Notes about the DynOut sample |
Dynout.idl | Interface definition language file |
Dynout.acf | Attribute configuration file |
Dynoutc.c | Client main program |
Dynouts.c | Server main program |
Dynoutp.c | Remote procedure |
Xx_midl.bat | Separate MIDL build file |
Makefile | Nmake file to build 32-bit client and server applications |
NMAKE builds the executable programs DYNOUT.EXE (client) and DYNOUTS.EXE (server).
This sample uses the following keywords:
check_status; defined; exit; free; grabchunk; malloc; memset; memstuff_grabchunk; midl_user_allocate; midl_user_free; ndrclientinitializenew; ndrconvert; ndrfcshort; ndrfreebuffer; ndrnsgetbuffer; ndrnssendreceive; ndrpointerbuffersize; ndrpointerfree; ndrpointermarshall; ndrpointerunmarshall; ndrserverinitializenew; printf; puts; rand; rpcbindingvectorfree; rpcepregister; rpcexcept; rpcexceptioncode; rpcnsbindingexport; rpcraiseexception; rpcserverinqbindings; rpcserverlisten; rpcserverregisterif; rpcserveruseallprotseqs; trace