title: Credential provider usage scenario: CPUS_UNLOCK_WORKSTATION removed from Windows 10
body: <p>I'm developing a custom credential provider and need to know at runtime if the scenario is a login or an unlock of the session. For this, I check the <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/bb762493(v=vs.85).aspx" rel="nofollow">CREDENTIAL_PROVIDER_USAGE_SCENARIO</a> returned by the <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/bb762493(v=vs.85).aspx" rel="nofollow">SetUsageScenario</a> of the ICredentialProvider interface. </p>
  
  <p>On Windows 10, independently if I'm at login or when the session is locked, I always get CPUS_LOGON as usage scenario, while on previous version of Windows, CPUS_UNLOCK_WORKSTATION was returned when the session was locked and CPUS_LOGON at the login.</p>
  
  <p>So it seems that changes appeared since Windows 10 that are not reported on MSDN. </p>
  
  <p>Is there any other way to detect if the usage scenario is a session locked?</p>