public static SafeFreeCredentials AcquireCredentialsHandle(string package, CredentialUse intent, ref IntPtr ppAuthIdentity)
        {
            SafeFreeCredentials outCredential = null;
            int error = SafeFreeCredentials.AcquireCredentialsHandle(package, intent, ref ppAuthIdentity, out outCredential);

            if (error != 0)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(error));
            }
            return(outCredential);
        }
Beispiel #2
0
        public static SafeFreeCredentials AcquireCredentialsHandle(
            string package,
            CredentialUse intent,
            ref AuthIdentityEx authdata)
        {
            SafeFreeCredentials credentialsHandle = null;
            int errorCode = SafeFreeCredentials.AcquireCredentialsHandle(package,
                                                                         intent,
                                                                         ref authdata,
                                                                         out credentialsHandle
                                                                         );

            if (errorCode != 0)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode));
            }
            return(credentialsHandle);
        }
Beispiel #3
0
        public static SafeFreeCredentials AcquireCredentialsHandle(
            string package,
            CredentialUse intent,
            SecureCredential scc)
        {
            SafeFreeCredentials outCredential = null;
            int errorCode = SafeFreeCredentials.AcquireCredentialsHandle(
                package,
                intent,
                ref scc,
                out outCredential
                );

            if (errorCode != 0)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new Win32Exception(errorCode));
            }
            return(outCredential);
        }