ILocationPermissions::GetGlobalLocationPermission method (sensorsapi.h)

Gets the status of the system setting that allows users to change location settings.

Syntax

HRESULT GetGlobalLocationPermission(
  [out] BOOL *pfEnabled
);

Parameters

[out] pfEnabled

TRUE if system settings allow users to enable or disable the location platform; otherwise, FALSE.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK
The method succeeded.
E_POINTER
NULL was passed in for pfEnabled.

Remarks

Note  GetGlobalLocationPermission is available in Windows 8.
 
For more information on location settings in Windows 8 see Location settings.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header sensorsapi.h
Library Sensorsapi.lib
DLL Sensorsapi.dll

See also

ILocationPermissions