GPSCom2 v1.06 A freeware COM Library for GPS
IConnectionPointImplMT v1.07 A freeware IConnectionPoint implementation for
Welcome to GPSCom2, a simple freeware COM based library which can be used
to add GPS support to your Windows applications. GPSCom2 is a standard COM EXE developed
in ATL in VC 2015. It is based on the design of the existing shareware
GPSCom component of the author which has now been obsoleted
by GPSCom2. GPSCom2 internally uses an advanced ATL class called IConnectionPointImplMT
to support firing COM events from worker threads different that the threads on which
the COM object was originally created. The GPSCom2 code internally used asynchronous
IO when reading from the serial port to provide the best performance and avoids
the need for polling. Included in the download is prebuilt GPSCom2 binaries for
x86 and x64. The GPSCom2 component delivers a simple string value of a sentence
back to client applications using the standard COM Connection Point notification
mechanism. A set of C++ client classes further abstracts this to provide a simple
C++ class with virtual functions for each type of NMEA sentence. These set of classes
are provided in the GPSCom2Client\GPSCom2Client.h header file which you can simple
include in your existing C++ client applications. These classes provide comprehensive
support for the following NMEA sentences: $GPRMC, $GPGGA, $GPGSV, $GPGLL, $GPVTG,
$GPGSA, $GPGRS & $GPGST. All the parsing of these sentences is handled for you
and standard virtual function and parsed structures are available for client applications
to code against.
The enclosed zip file contains the GPSCom2
source code, and a x86 and x64 Unicode Release binary and a sample VC++ 2015 test
app which exercises the C++ client classes.
- Provides a very simple C++ client API to the out of process COM object hiding
all the COM plumbing required to achieve this.
- Allows connections to GPS devices to be shared between multiple clients
i.e. multiple client processes can share the one connection to the receivers
serial port !!. This is achieved by the IGPSConnection::CreateConnection method
which hands back existing connections if the port number requested matches an
already open port.
- Standard COM Connection points are provided in the library to allow client
apps to be notified in real time of incoming GPS NMEA sentences, but this plumbing
is all hidden by the client classes.
- Provides a concrete example on how COM collection classes should be implemented.
- Comprehensive support for the following NMEA sentences: $GPRMC, $GPGGA,
$GPGSV, $GPGLL, $GPVTG, $GPGSA, $GPGRS & $GPGST. This is a pretty comprehensive
set of NMEA sentences available from most GPS devices.
- Client apps can also poll the connection for the NMEA information if they
so desire or hook into the virtual functions which get called when a specific
sentence is received.
- Supports any standard GPS device which supports the NMEA 0183 standard and
which presents its data on a Windows Serial Port (Physical or Virtual/Emulated).
- The GPSCom2 binary does not have any dependencies on ATL or MFC DLLs. It
is a purely ATL based implementation unlike GPSCom and only takes dependencies
on standard Windows DLLs.
- Supports per user registration as well as the standard per machine registration.
This is achieved by the use of the "RegServerPerUser" and "UnregServerPerUser"
command line options to GPSCom2.
V1.06 GPSCom2 (7 November 2017)
- Replaced CString::operator LPC*STR() calls with CString::GetString calls.
- Added missing targetver.h file to the zip download file.
- Included information in GPSCom2Client.h about registering GPSCom2.
- Reworked CGPSConnection::HandleRead code to avoid an off by one
termination issue. Thanks to Frits van Veen for reporting this bug.
- Fixed a compile issue in GPSCom2Client.h when
_ATL_NO_AUTOMATIC_NAMESPACE is defined.
- Refactored the CGPSConnection::MonitorThread code to use a new
- Fixed a high CPU utilization bug in GPSCom2 due to code in
CGPSConnection::MonitorThread. Thanks to Frits van Veen for reporting this
- Fixed an issue in the new CGPSConnection::HandleRead method where the
code will incorrectly send an empty sentence to GPSCom2 clients.
- Added validation code to each of the CSentence::Parse methods to verify
the size of the "sFields" array. Thanks to Frits van Veen for reporting this
V1.05 GPSCom2 / v1.07 IConnectionPointImplMP (7 March 2017)
- Updated the code to compile cleanly using /permissive-.
V1.04 GPSCom2 / v1.06 IConnectionPointImplMP (7 March 2017)
- Updated copyright details.
- Updated code to clean compile in VC 2017
- Updated comment on the #import "libid:.." line to tell the user
how to resolve the issue.
V1.03 GPSCom2 / v1.05 IConnectionPointImplMP (19 November 2016)
- Updated copyright details.
- Replaced NULL throughout the codebase with nullptr
- The binaries and project include in the download are now compiled using
VC 2015 and include x64 binaries as well as x86 binaries.
- Provided a CreateConnection2 method which allows you to open the GPS port
without the need to specify DataBits, BaudRate, StopBits and Parity parameters.
This new method will simply open the specified port and send the init string
- Added support for IGPSPort:CreateConnection2 to the GPSCom2Client classes.
- Added SAL annotations to the GPSCom2Client classes.
- General clean-up and review of the code in GPSCom2 and GPSCom2Client.
- Fixed issue in the message when the code detects you do not have atlcom.h
included in the GPSCom2Client classes. Thanks to Frits van Veen for reporting
V1.02 GPSCom2 / v1.04 IConnectionPointImplMP (17 December 2015)
- Updated copyright details.
- Updated sample client app to clean compile in VC 2010 - 2015.
- Update GPSCom2 to clean compile on VC 2013 - 2015.
- Reworked the GPSCom2Client classes to optionally compile without MFC. By
default the class now use STL classes and idioms but if you define CGPSCOM2CLIENT_MFC_EXTENSIONS
the class will revert back to the MFC behaviour.
- Reworked the IConnectionPointImplMT::GetInterfaceAt method to have the following
signature: HRESULT GetInterfaceAt(int nConnectionIndex, CComPtr<TSinkInterface>&
pTSinkInterface) This change from returning a CComPtr<IDispatch>&
means that the code can handle client situations where an IDispatch interface
is not available. This can occur where the event interface is implemented as
a marshalled C# class. Thanks to David Korn for reporting this issue.
V1.01 GPSCom2 (1 May 2010)
- Updated the CSentence::Time method to correctly handle centiseconds values
- Updated the CSentence::Angle method to correctly handle empty fields
- Fixed logic errors in CVTGSentence::Parse
- CSentence::Tokenize now removes all fields from the array before it starts
- All places which parse a floating point number now handle empty fields
V1.0 GPSCom2 / v1.03 IConnectionPointImplMP (1 May 2010)
- Initial public release of GPSCom2.
- IConnectionPointImplMP has been updated to work when "using namespace
ATL" is now explicitly set in client code.
- IConnectionPointImplMP::GetInterfaceAt method has been reworked to surface
a HRESULT as a return value. In addition the IDispatch pointer is now returned
already wrapped in a CComPtr<IDispatch> smart pointer reference parameter.
The instructions of how you recode the Fire_* methods have also been reworked.