Click here to Skip to main content
Click here to Skip to main content

GPS and Web Service using C++ ATL/WTL (Windows Mobile 6, Standard)

By , 18 Jan 2008
 
gpsdemographics.zip
GPSDemographics
com_cdynews
DemographixQuery.disco
DemographixQuery.wsdl
results.discomap
res
background.bmp
Demographics.ico
GPSDemographicsSetup
GPSDemographicsSetup.vddproj
gpsdemographicssetupcab.zip
GPSDemographicsSetup.CAB
#pragma once
#include <GPSApi.h>
#include "IGPSSink.h"

class CGPSDevice
{
private:
	//Singleton instance
	static CGPSDevice * s_pInstance;

	//Device handle
	HANDLE m_hGPS_Device;

	//Event for location data updates
	HANDLE m_hNewLocationData;

	//Event for device state changes
	HANDLE m_hDeviceStateChange;

	//Thread's handle and id
	HANDLE m_hThread;
	DWORD m_dwThreadID;

	//Exit event
	HANDLE m_hExitThread;

	//Pointer to sink interface
	IGPSSink * m_pSink;

private:
	//Our wrapper is singleton make constructor private
	CGPSDevice(void);

	HRESULT StartThread();
	HRESULT StopThread();

	static CGPSDevice * Instance();
	static DWORD WINAPI GPSThreadProc(__opt LPVOID lpParameter);
public:

	~CGPSDevice(void);

	static HRESULT TurnOn(IGPSSink * pSink);
	static HRESULT TurnOff();
};

By viewing downloads associated with this article you agree to the Terms of use and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Valentin Ivanov
Chief Technology Officer CDYNE Corporation
United States United States
Member
No Biography provided

Permalink | Advertise | Privacy | Mobile
Web01 | 2.6.130516.1 | Last Updated 18 Jan 2008
Article Copyright 2008 by Valentin Ivanov
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid