About GPS ToolKit.NET
Introduction
Purchasing GPS ToolKit.NET
Redistributing GPS ToolKit.NET
License Agreement
Support
Getting Started
Getting Started
Setting up the GPS
Basic Concepts
GPS ToolKit Sample Projects
About GPS ToolKit Errors
Reference
GPSToolKit Class
Properties
BaudRate
ExtendedFixData
IsGPSConnected
IsPortOpen
LastPositionUpdateTime
NavigationData
PortName
Protocol
Position
Satellites
Speed
TrueCourse
Methods
AddRoute
AddTrack
AddWaypoint
AutoDetectGPS
Close
GetAvailableSystemPorts
GetGPSInfo
GetRoutes
GetSystemPorts
GetTracks
GetWaypoints
Open
ShutOffGPS
WriteRawBinaryToGPS
WriteRawToGPS
Events
FileComplete
GPSConnected
GPSDisconnected
NavigationUpdate
PositionUpdate
RawDataReceived
SatelliteUpdate
Supporting Classes
Altitude
Angle
Distance
ExtendedFixData
Properties
DGPSRefStationID
EstimatedHorizontalError
EstimatedPositionError
EstimatedVerticalError
FixMode
GeoidHeightAboveWGS84
HDOP
MagneticVariation
NumSatellitesInView
PDOP
TimeSinceLastDGPSUpdate
VDOP
GPSInfo
Latitude
Methods
ToDecimalDegreesString
ToDegreesMinutesString
ToDegreesMinutesSecondsString
Longitude
Methods
ToDecimalDegreesString
ToDegreesMinutesString
ToDegreesMinutesSecondsString
NavData
Properties
ActiveRoute
ArrivedAtDest
CrossTrackError
DestWptName
DestWptPosition
IsValid
MagBearingFromOriginToDest
OriginWptName
TrueBearingFromOriginToDest
TrueBearingToDestWpt
VelocityTowardDestWpt
Position
Methods
BearingFrom
BearingTo
DistanceTo
Route
Properties
Name
Waypoints
Satellite
Speed
Track
Properties
Color
DisplayTrack
Name
TrackPoints
TrackPoint
Waypoint
Collections
RouteCollection
SatelliteCollection
TrackCollection
TrackPointCollection
WaypointCollection

GetSystemPorts Method

Returns a collection of the names of COM ports in the system.

Syntax

[Visual Basic]
object.GetSystemPorts()

[C#]
object.GetSystemPorts()

[C++]
object->GetSystemPorts()

Parameters

object

An object expression that evaluates to a GPSToolKit object.

Return Value

A StringCollection containing the names of the COM ports in the system.

Default

Empty

Remarks

This property returns the names of the ports that exist on the system, including ports that are in use by other processes (that is, each port that cannot currently be opened). To get a list of all ports on the system that are openable, use the GetAvailableSystemPorts method.

Errors

If GPS ToolKit is unable to determine the COM ports on the system, SystemPortsException is thrown. It is likely, however, you will still be able to open a port directly using the Open() method.

Example

[Visual Basic]
Dim SystemPorts As System.Collections.Specialized.StringCollection
SystemPorts = myGPSToolKit.GetSystemPorts()


[C#]
System.Collections.Specialized.StringCollection SystemPorts;
SystemPorts = myGPSToolKit.GetSystemPorts();


[C++]
System::Collections::Specialized::StringCollection *SystemPorts;
SystemPorts = myGPSToolKit->GetAvailablePorts();

See Also

GetAvailableSystemPorts method | Open method | OpenFile method | AutoDetectGPS method