mhammond / pywin32

Python for Windows (pywin32) Extensions
4.92k stars 786 forks source link

`CredGetSessionTypes` is not implemented in `win32credmodule.cpp` #2067

Closed gosselind1 closed 3 months ago

gosselind1 commented 1 year ago

Hi, I was looking to write up a function to sanity check that credentials could be saved before attempting to write credentials. To accomplish this, I wanted to call CredGetSessionTypes to ensure the following:

  1. CRED_PERSIST_NONE was not returned for the particular credential type.
  2. ERROR_NO_SUCH_LOGON_SESSION was not produced as an error.

Both the error and constant are implemented in the current pywin32 source.

Looking at the API details for the function, it appears to not be a low-level "clean-up" function like CredFree, and therefore CredGetSessionTypes not being a part of the currently implemented source is either a bug or feature omission depending on perspective.

Avasam commented 3 months ago

Closed by #2232