SHDeviceLockAndPrompt can only be called by a privileged application.
A successful return value does not guarantee that the device was unlocked by the user, or even successfully locked, but only that the process to lock and unlock the device has started.