Embedded Visual Basic Windows Ce And Pocket Pc Mobile Applications [Electronic resources]

Chris Tacke; Timothy Bassett

نسخه متنی -صفحه : 108/ 42
نمايش فراداده

eMbedded Visual Basic®: Windows® CE and Pocket PC Mobile Applications

By Chris Tacke, Timothy Bassett

Table of ContentsChapter 5. Using the Windows CE WinSock for IR Communication


Understanding the WinSock Control

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.

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.

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.