Aremote: SNA Sample

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

This sample has the following parts:

Main Files

File Description
Remote.c This module contains the main entry point for Remote. Calls the Server or the Client depending on the first parameter.
APPC Remote Installer This program brings up a dialog box that prompts for TP configuration information.  The information is then placed in the registry under Windows NT, and in the Win.ini file under Windows.  The WIN32 compiler flag specifies the NT version, while the WINDOWS flag specifies the Windows version.
Client.c The Client component of Remote. Connects to the remote server using named pipes. It sends its stdin to the server and outputs everything from the server to its stdout.
Server.c The server component of Remote. It spawns a child process and redirects the stdin/stdout/stderr of child to itself. Waits for connections from clients, passing the output of child process to client and the input from clients to child process.

There is a Snaenv.bat file to set environment variables, available via the SNA Samples topic.

Building SDK Samples

This sample uses the following keywords:

_wcslwr; _wcsupr; acssvc_c; addtoq; appc_flipi; appc_flipl; appcclose; appcconnect; appcdbg; appcdestroy; appcerror; appcinit; appclisten; appcread; appcvalid; appcwrite; asyncappc; atoi; atol; callappc; calloc; callwindowproc; clearvcb; client; closeclient; closehandle; closeservicehandle; cmdstring; controlhandler; conv_a_to_e; convsecwndproc; createevent; createfile; createkeys; createmysecuritydescriptor; createpipe; createsemaphore; createservice; createthread; dbgprint; debugbreak; deletefile; deletelistitem; displayclienthlp; displayerror; displayinfo; displayserverhlp; do_confirm; do_deallocate; do_get_fqplu_name; do_mc_allocate; do_prepare_to_receive; do_receive_and_wait; do_send_data; do_tp_ended; do_tp_started; enablewindow; enddialog; entercriticalsection; errorexit; errormsg; establishsession; exit; exitprocess; exitthread; filterclientinp; filtercommand; findfirstfile; finitewndproc; forkchildprocess; free; freeprocinstance; generateconsolectrlevent; get_wm_command_id; getactivewindow; getappcreturncode; getchldoutput; getclientinput; getcolornum; getcommandline; getcomputername; getconsolescreenbufferinfo; getconsoletitle; getcurrentdirectory; getcurrentprocess; getdlgitem; getdlgitemtext; getenvironmentstrings; getenvironmentvariable; getfilesize; getfullpathname; getlasterror; getlengthsid; getlocaltime; getopenfilename; getserverout; getstdhandle; getsystemdirectory; gettempfilename; gettickcount; getversion; getwindowlong; infinitewndproc; initclientlist; initializecriticalsection; installcallback; installservicent; installwindows; interlockeddecrement; interlockedincrement; isdlgbuttonchecked; leavecriticalsection; listenforsession; listenthread; loadstring; localalloc; localfree; locallock; localsession; localunlock; lockservicedatabase; lstrcat; lstrcmp; lstrcpy; lstrlen; makeprocinstance; makevalidluname; malloc; maximum; mbstowcs; memalloc; memcmp; memcpy; memcpya2e; memcpypad; memfree; memset; messagebox; minimum; movememory; mych; newq; newsession; openscmanager; parsecreateerror; postquitmessage; printf; readconsole; readfile; readfixbytes; readstring; regcreatekeyex; registerservicectrlhandler; regsetvalueex; releasesemaphore; remote_main; remoteinfo; remotesession; removeheadfromq; removeinpmark; removeqnodefromq; sendmessage; sendmyinfo; sendserverinp; sendstatus; server; servicemain; servicewndproc; setcolor; setconsolectrlhandler; setconsoletextattribute; setdlgitemtext; setevent; setfilepointer; setlasterror; setservicestatus; setwindowlong; showpopup; sleep; sprintf; srvctrlhand; startservicectrldispatcher; stdinthread; stdoutthread; strcat; strcpy; switch; terminateprocess; terminatethread; text; tolower; toupper; transferfiletoclient; unlockservicedatabase; unreferenced_parameter; validatefield; validatefieldappc; validatefieldint; waitformultipleobjects; waitforsingleobject; wcscpy; wcsstr; wcstombs; winappccancelasyncrequest; winappccleanup; winappcstartup; winasyncappcex; writeconsole; writef; writefile; writekeynt; writekeywindows; writeprofilestring; wsprintf; zeromemory