VirtualBox

source: vbox/trunk/src/VBox/Additions/WINNT/VBoxCredProv/testcase/tstCredentialProvider.cpp@ 40272

Last change on this file since 40272 was 40268, checked in by vboxsync, 13 years ago

VBoxCredProv: Rewritten VirtualBox credential provider; now uses proper (optional) guest logging, added auto-logon facility status reporting.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 730 bytes
Line 
1#include <windows.h>
2#include <stdio.h>
3#include <WinCred.h>
4
5int main(int argc, TCHAR* argv[])
6{
7 BOOL save = false;
8 DWORD authPackage = 0;
9 LPVOID authBuffer;
10 ULONG authBufferSize = 0;
11 CREDUI_INFO credUiInfo;
12
13 credUiInfo.pszCaptionText = TEXT("VBoxCaption");
14 credUiInfo.pszMessageText = TEXT("VBoxMessage");
15 credUiInfo.cbSize = sizeof(credUiInfo);
16 credUiInfo.hbmBanner = NULL;
17 credUiInfo.hwndParent = NULL;
18
19 DWORD dwErr = CredUIPromptForWindowsCredentials(&(credUiInfo), 0, &(authPackage),
20 NULL, 0, &authBuffer, &authBufferSize, &(save), 0);
21 printf("Test returned %ld\n", dwErr);
22
23 return dwERR == ERROR_SUCCESS ? 0 : 1;
24}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette