Windows Dev Center

ILocationPermissions::GetGlobalLocationPermission method

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

Syntax


HRESULT GetGlobalLocationPermission(
  [out] BOOL *pfEnabled
);

Parameters

pfEnabled [out]

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 codeDescription
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

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Sensorsapi.h

Library

Sensorsapi.lib

DLL

Sensorsapi.dll

See also

ILocationPermissions

 

 

Community Additions

ADD
Show:
© 2015 Microsoft