Understanding the WinSock Control

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


The Microsoft WinSock control is distributed with the platform SDK for each Windows CE platform. It's included in the MSCEWinsock.dll library. The control is added to projects in eVB is the same manner as in other versions of Visual Basic by choosing Components from the Tools menu. You can specifically add the WinSock control to your project by adding the Microsoft CE WinSock Control 3.0 component library, as shown in Figure 5.1.

Figure 5.1. Adding the WinSock Control library to your project.

graphics/05fig01.gif

Adding the reference places the WinSock controls into the eVB Toolbox. Its icon looks like two PCs connected with a red line, which you can see in Figure 5.2.

Figure 5.2. The eVB toolbox with the standard controls and the WinSock control.

graphics/05fig02.gif

The Control's Object Model

The following is a list of the methods , properties, and events used in this chapter:

Methods Properties Events
Accept BytesReceived Close
Close LocalHostName ConnectionRequest
Connect LocalPort Connect
GetData Protocol DataArrival
Listen RemoteHost Error
SendData RemoteHostIP SendComplete
  RemotePort SendProgress
  SocketHandle  
  State  
  ServiceName  

If you compare this list to the Object Model, you will see that we cover everything except LocalIP, Name , Parent, and Tag. Essentially, once you are finished with this chapter, there should be nothing within the control's capabilities that you can't do.


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