CredUIPromptForCredentialsW

C# Signature:

[DllImport("credui", CharSet = CharSet.Unicode)]
  private static extern CredUIReturnCodes CredUIPromptForCredentialsW(ref CREDUI_INFO creditUR, 
            string targetName,
            IntPtr reserved1,
            int iError,
            StringBuilder userName,
            int maxUserName,
            StringBuilder password,
            int maxPassword,
            [MarshalAs(UnmanagedType.Bool)] ref bool pfSave,
            CREDUI_FLAGS flags);

VB .NET Signature:

Declare Function CredUIPromptForCredentialsW Lib "credui.dll" (byref creditUR AS CREDUI_INFO, _
                            byval targetName as string, _
                            byval reserved1 as IntPtr, _
                            byval iError as int32, _
                            byref UserName as StringBuilder, _
                            byval maxUserName AS int32, _
                            byref password AS StringBuilder, _
                            byval maxPassword as inte32, _
                            <MarshalAs(UnmanagedType.Bool)> byref pfSave AS Boolean, _
                            flags AS CREDUI_FLAGS) As CredUIReturnCodes

Sample Code:

Última actualización