SOL9 Sample: CredentialsDialog

SOL9 2.0 Samples

1 Screenshot


2 Source code

/*
 * CredentialsDialog.cpp 
 * Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


// SOL9
// 2009/04/10

#include <sol/CredentialsDialog.h>

void _tmain(int argc, TCHAR** argv)
{ 
  CredentialsDialog dialog;
  {
    //Use empty username and password strings.
    String username;
    String password;

    if (dialog.show(username, password, _T("Somewhere Server")) == ERROR_SUCCESS) {
      _tprintf(_T("Username = %s\n"), (const TCHAR*)username);
      _tprintf(_T("Password = %s\n"), (const TCHAR*)password);
      username.secureClear();
      password.secureClear();
    }
  }

  {
    //Use non-empty default username and password strings. 
    String username = _T("FooDomain\\User");
    String password = _T("1%$QweU9?[KL}");

    if (dialog.show(username, password, _T("FooDomain")) == ERROR_SUCCESS) {
      _tprintf(_T("Username = %s\n"), (const TCHAR*)username);
      _tprintf(_T("Password = %s\n"), (const TCHAR*)password);
      username.secureClear();
      password.secureClear();
    }
  }
}

Last modified: 2 May 2016

Copyright (c) 2016 Antillia.com ALL RIGHTS RESERVED.