|
GPS ToolKit.NET
GetAvailableSystemPorts Method
Returns a collection of port names available to be opened.
Syntax
[Visual Basic]
object.GetAvailableSystemPorts()
[C#]
object.GetAvailableSystemPorts()
[C++]
object->GetAvailableSystemPorts()
Parameters
object
An object expression that evaluates to a GPSToolKit object.
Return Value
A StringCollection containing the names of the COM ports that are available to be opened.
Default
Empty
Remarks
This property returns only ports that exist on the system that are not in use by other processes (that is,
each port that can be opened). To get a list of all ports on the system, regardless of state, use
the GetSystemPorts 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 AvailableSystemPorts As System.Collections.Specialized.StringCollection
AvailableSystemPorts = myGPSToolKit.GetAvailableSystemPorts()
[C#]
System.Collections.Specialized.StringCollection AvailableSystemPorts;
AvailableSystemPorts = myGPSToolKit.GetAvailableSystemPorts();
[C++]
System::Collections::Specialized::StringCollection *AvailableSystemPorts;
AvailableSystemPorts = myGPSToolKit->GetAvailableSystemPorts();
See Also
GetSystemPorts method | Open method | OpenFile method | AutoDetectGPS method
|