Share via


LocationRegisterForReport (Windows Embedded CE 6.0)

1/6/2010

This function indicates that an application wants the Location Framework to determine the position of the device and to return this in a specified report type.

Syntax

DWORD LocationRegisterForReport(
    HLOCATION hLocation,
    HANDLE    hNewLocationReport,
    HANDLE    hStateChangeEvent,
    REFGUID   reportType,
    DWORD     flags
);

Parameters

  • hLocation
    A handle to the Location Framework returned from a call to LocationOpen.
  • hNewLocationReport
    Handle to a Windows Embedded CE 6.0 event created using CreateEvent, or NULL. The Location Framework signals the passed event whenever it has a new report of reportType.
  • hStateChangeEvent
    Handle to a CE 6.0 event created using CreateEvent, or NULL. The Location Framework signals the passed event whenever a plugin that generates reportType changes state.
  • reportType
    GUID indicating the report type that should be looked up.
  • flags
    Reserved. Must be 0.

Return Value

If successful, returns ERROR_SUCCESS.

If unsuccessful, returns an error code.

Remarks

Once the Location Framework has been registered with a particular report type, it will attempt to generate it until LocationUnRegisterForReport is called. Providers and Resolvers may use a large amount of battery power and/or incur extra traffic across a network. Therefore, applications should only remain registered for reports that they require and should unregister as soon as the report is no longer needed.

If another application has already registered for the specified report type, the Location Framework will increment its internal reference count for the report type but will take no further action.

Requirements

Header lfapi.h
Library lfapi.lib
Windows Embedded CE Windows Embedded CE 6.0 and later

See Also

Reference

Location Framework Functions
LocationOpen