WinTyp: Client-Server Bitmap Processor Sample

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

This sample demonstrates how to write a program that uses RPC calls to transfer windows datatypes between the client and the server. The client reads in a bitmap and when the user selects to modify the image, the bitmap is sent to the server, where the server is doing the modification. The bitmap is then sent back to the client, where the new bitmap is displayed.

There are two choices for manipulating the images, either to flip it or to find the edges in it. The find edge procedure will only work when the screen resolution is set to 256 colors. The reason for this is that the algorithm used in the remote procedures only works with 8 bits per pixel.

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

Main Files

File Description
Wintyp.idl Interface definition language file
Wintyp.acf Attribute configuration file
Client.c Client main program
Client.h Header file specific for the client side
Client.rc Resource file for the client application
Clires.h Resource header file
Server.c Server main program
Common.h Common header file for all the files
Remote.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:

_stprintf; _tcscmp; _tcscpy; _tprintf; aboutdlgproc; abs; beginpaint; bind; bindingdlgproc; bitblt; changebitmapremote; cleanup; cleanupserver; clientproc; clientwindowproc; closehandle; commandlinetoargvw; createcompatibledc; createfile; createpalette; createwindowex; defined; defwindowproc; deletedc; deleteobject; destroywindow; dialogbox; dispatchmessage; enablemenuitem; enddialog; endpaint; exit; exit_if_fail; fillrect; findedges; flipimage; free; get2dpointer; getbitmapbits; getbitmapfilename; getclientrect; getcommandline; getdc; getdevicecaps; getdlgitemtext; getmapmode; getmenu; getmessage; getobject; getopenfilename; getstockobject; getsystemmetrics; getwindowrect; globalalloc; globalfree; globallock; globalunlock; hbitmap_userfree; hbitmap_usermarshal; hbitmap_usersize; hbitmap_userunmarshal; invalidaterect; loadaccelerators; loadcursor; loadicon; loadimage; loadpalettefromfile; makeintresource; malloc; messagebox; midl_user_allocate; midl_user_free; movewindow; ndrclientinitializenew; ndrconvert; ndrfclong; ndrfcshort; ndrfreebuffer; ndrgetbuffer; ndrpointerfree; ndrsendreceive; ndrserverinitializenew; ndrusermarshalbuffersize; ndrusermarshalmarshall; ndrusermarshalunmarshall; postmessage; postquitmessage; print; readbitmapfromfile; readfile; realizepalette; redrawclientarea; registerclass; releasedc; rpcbindingfree; rpcbindingfromstringbinding; rpcexcept; rpcexceptioncode; rpcmgmtstopserverlistening; rpcraiseexception; rpcserverlisten; rpcserverregisterif; rpcserverunregisterif; rpcserveruseprotseqep; rpcstringbindingcompose; rpcstringfree; selectpalette; setbitmapbits; setdlgitemtext; setfilepointer; showwindow; shutdown; switch; text; translateaccelerator; translatemessage; updatewindow; usage; winmain; wintyp_sample_changebitmapremote; wintyp_sample_shutdown