VirtualBox

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

最後變更 在這個檔案從46183是 44975,由 vboxsync 提交於 12 年 前

VBoxCredProv/testcase: No WINDDK needed or present; No need for special PSDK any more; Fixed build issue.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 730 位元組
 
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}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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