SOL9 Sample: Guid

SOL9 2.0 Samples

1 Screenshot


2 Source code

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


// 2011/09/04 Modified this sample program to find Windows7 OS.

#include <sol\Guid.h>
#include <sol\WindowsVersion.h>


void _tmain(int argc, TCHAR* argv[])
{
  StringT<TCHAR> string;
  Guid guid;
  guid.create(string);

  _tprintf(_T("[GUID Generation Example]\n"));
  _tprintf(_T("String:\n%s\n"), (const TCHAR*)string);

  Bytes byteArray;
  guid.create(byteArray);

  printf("ByteArray:\n");  
  byteArray.dump();

  WindowsVersion version;
  DWORD platform, major, minor;
  version.getVersion(platform, major, minor);

  _tprintf(_T("\n[Windows Version]\n"));

  _tprintf(_T("Platform=%d MajorVersion=%d MinorVersin=%d\n"),
    platform, major, minor);

  bool rc = version.isWindows7();
  if (rc) {
    _tprintf(_T("This OS is Windows7 \n"));
  } else {
    rc = version.isVista();
    if (rc) {
      _tprintf(_T("This OS is Windows Vista\n"));
    } else {
      _tprintf(_T("This OS is NOT Windows Vista\n"));

    }
  }
}

Last modified: 2 May 2016

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