Ejemplo n.º 1
0
 private static extern CredUIReturnCodes CredUIPromptForWindowsCredentials(
     ref CREDUI_INFO creditUR,
     uint dwAuthError,
     ref uint pulAuthPackage,
     IntPtr pvInAuthBuffer,
     uint ulInAuthBufferSize,
     [Out] out IntPtr ppvOutAuthBuffer,
     out uint pulOutAuthBufferSize,
     [MarshalAs(UnmanagedType.Bool)] ref bool pfSave,
     CREDUI_FLAGS_NEW dwFlags
     );
Ejemplo n.º 2
0
        internal static void Test()
        {
            CREDUI_INFO credUI = new CREDUI_INFO();

            credUI.cbSize         = Marshal.SizeOf(credUI);
            credUI.pszCaptionText = "Hello";
            credUI.pszMessageText = "There";
            CREDUI_FLAGS_NEW flags       = CREDUI_FLAGS_NEW.CREDUIWIN_AUTHPACKAGE_ONLY;
            bool             save        = false;
            uint             authPackage = 0;
            IntPtr           p;
            uint             psize = 0;

            if (CredUIPromptForWindowsCredentials(ref credUI, 0, ref authPackage, IntPtr.Zero, 0, out p, out psize, ref save, flags) == CredUIReturnCodes.NO_ERROR)
            {
            }
        }
Ejemplo n.º 3
0
 private static extern CredUIReturnCodes CredUIPromptForWindowsCredentials(
         ref CREDUI_INFO creditUR,
         uint dwAuthError,
         ref uint pulAuthPackage,
         IntPtr pvInAuthBuffer,
         uint ulInAuthBufferSize,
         [Out] out IntPtr ppvOutAuthBuffer,
         out uint pulOutAuthBufferSize,
         [MarshalAs(UnmanagedType.Bool)] ref bool pfSave,
         CREDUI_FLAGS_NEW dwFlags
     );