Summary

Team-Fly    

 
eMbedded Visual Basic: Windows CE and Pocket PC Mobile Applications
By Chris Tacke, Timothy Bassett
Table of Contents
Chapter 5.  Using the Windows CE WinSock for IR Communication


PocketChat (and PCChat, if you've decided to use it) has provided you with working code for just about the entire WinSock object model, plus given you a small working example of the MenuBar in a full project. In addition, it has given you a simple, reusable progress bar.

Admittedly, PocketChat, as it now stands, can't be used to solve a great many problems, but it does provide a very strong foundation on which to build. It isn't much of a stretch to get the application to connect with a more common instant messenger service. A little research on the Internet can provide the specifics of many of the IM services available.

Another more exciting and extensible direction in which to take the application is to extend what you've learned about file transfer to full data transfer. After reading about ADOCE in Chapter 7, "Storing and Receiving Data with ActiveX Data Objects CE," try passing an entire Recordset as XML to another client and re-creating the Recordset there. Or pass it to a desktop VB application. After you accomplish that, the uses are unlimited.

If you're after an even larger challenge, read the explanation in Chapter 9, "Harnessing the Windows CE API," of working around eVB's lack of structure or UDT support and apply that knowledge to transferring binary data instead of text through the control. Just because the documentation states that only text and integer arrays can be passed through the control doesn't mean that you can't get it to pass binary data. It just isn't as straightforward.

So, if you're looking for more things to do with sockets and PocketChat, consider the following as challenges and/or feature upgrades:

  • Add a File Explorer type interface for selecting a file to sendyou could roll your own or use the Common Dialog control.

  • Have the application save state. That is, have it remember the last host it connected to so the user doesn't have to type it in. You could keep this information in a file, the registry or even a database.

  • Allow the user to save the text of a session as a text file.

  • Have the text box hold only a certain amount of text. Trim the oldest text off as new text comes in to prevent the textbox from using large amounts of memory.

  • Allow connections to a common IM service.

  • Allow connections to multiple clients at one time to provide a chat room, where all clients see all messages.

  • Send an ADOCE Recordset's data as XML to a remote machine and re-create the Recordset there.

  • Send binary (non-text) data through a socket connection.


Team-Fly    
Top
 


eMbedded Visual BasicR. WindowsR CE and Pocket PC Mobile Applications
eMbedded Visual BasicR. WindowsR CE and Pocket PC Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2001
Pages: 108

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net