Exercise 1: Obtaining Location Reports
In this exercise, you will create a Win32 application that reads and prints the latitude/longitude location and civic address location synchronously, and then subscribes to location update reports. You will use eDLP to modify your default location (both latitude/longitude and civic), causing the application's location update event handlers to execute and print the updated location.
Before beginning this exercise, make sure you don't have any location sensors attached, physical or virtual. They will override the Default Location and will cause incorrect results. To do so:
To begin this exercise, open Visual Studio. Create a new Win32 Console Application project and call it LocationHOL: File --> New --> Project... --> Visual C++ (may be under Other Languages) --> Win32 --> Win32 Console Application.
Create the project in a writable directory (for example, C:\Temp).
Name the project LocationHOL.
HelpIn the interests of brevity and simplicity, the demo application does not demonstrate best practices of Win32 development, nor does it exhibit the best design guidelines for object-oriented development and COM development.
Task 1 - Reading Location Synchronously
In this task, you will read and display latitude/longitude location synchronously. You will query the status of the report type as well as request user consent to use the information.
Task 2 - Reading Location Asynchronously
In this task, you will read and display a civic address location asynchronously.