SOL9 Sample: Base64FileEncoder
|
1 Screenshot
2 Source code
/*
* Base64FileEncoder.cpp
* Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED.
*/
// 2008/09/30 Modified to include the header file for SOL::Base64FileEncoder
#include <sol\Base64FileEncoder.h>
////////////////////////////////////////
// Program main
void _tmain(int argc, TCHAR* argv[])
{
if (argc <3) {
_tprintf(_T("Usage:Base64FileEncoder.exe filePath base64FilePath [insertNewLine(0|1)]\n"));
_tprintf(_T("Note:Optional argument:insertNewLine=0(false), or 1(true),\nif omitted this argument, insertNewLine is set to be true.\n\n"));
_tprintf(_T("Example:Base64FileEncoder.exe filePath base64FilePath 0\n"));
return;
}
bool insertNewLine = true;
if (argc == 4) {
if (atoi(argv[3])== 0) {
insertNewLine = false;
}
}
Base64FileEncoder encoder(insertNewLine);
bool rc = encoder.encode(argv[1], argv[2]);
if (rc) {
_tprintf(_T("Base64FileEncoder,OK\n"));
}
}
Last modified: 2 May 2016
Copyright (c) 2016 Antillia.com ALL RIGHTS RESERVED.