On this MSDN page the CredWriteW function is described and there is a section of the errors it can return if it does not complete successfully. However I do not see what number/integer each error code corresponds to. Since if the function returns FALSE
we must use GetLastError
to get the status code, which is a number, then how can I map the status code to one of the error codes shown in the MSDN page?
I am not sure if the FormatMessage
function will help, as I am not sure if CredWriteW
is a “system” function.
So, what I want to know is, for example, which status code/number does ERROR_INVALID_FLAGS
correspond to?
When I run my code and CredWriteW
returns false
and I get some number from GetLastError
what does that number mean?
I am using C# and LibraryImport
.
1