I have enabled following policy on my Windows server 2008 :
Local Computer Policy\Computer Configuration\Administrative Templates\Windows Components\Credential User Interface\Require trusted path for credential entry.
I use following function to funtion to get the user credentials :
CredUIPromptForWindowsCredentials(ref creduiInfo, 0, ref authPackage,
inCredBuffer, inCredSize, out outCredBuffer, out outCredSize, ref save,CREDUIWIN_AUTHPACKAGE_ONLY);
The above function does not return any error.
Now the buffer (outCredBuffer) populated in above function has to be decrypted and converted to strings (username, domain name, etc).
To do this I used following function:
CredUnPackAuthenticationBuffer(CRED_PACK_PROTECTED_CREDENTIALS,....,.,..)
but this function is not able to decrypt the buffer and returns error code 775.
Any help is much appreciated!
Note: Everything works fine if I disable the policy (mentioned above)
Local Computer Policy\Computer Configuration\Administrative Templates\Windows Components\Credential User Interface\Require trusted path for credential entry.
I use following function to funtion to get the user credentials :
CredUIPromptForWindowsCredentials(ref creduiInfo, 0, ref authPackage,
inCredBuffer, inCredSize, out outCredBuffer, out outCredSize, ref save,CREDUIWIN_AUTHPACKAGE_ONLY);
The above function does not return any error.
Now the buffer (outCredBuffer) populated in above function has to be decrypted and converted to strings (username, domain name, etc).
To do this I used following function:
CredUnPackAuthenticationBuffer(CRED_PACK_PROTECTED_CREDENTIALS,....,.,..)
but this function is not able to decrypt the buffer and returns error code 775.
Any help is much appreciated!
Note: Everything works fine if I disable the policy (mentioned above)