?? errorhandling.cpp
字號:
/*
* ErrorHandling.cpp
*
* Copyright (C) 2007
* Paul E. Jones <paulej@arid.us>
* All Rights Reserved.
*
******************************************************************************
* $Id: ErrorHandling.cpp,v 1.1 2007/05/14 10:41:43 paulej Exp $
******************************************************************************
*
* This file defines various global error handling and reporting functions.
*
*/
#include "stdafx.h"
/*
* ReportError
*
* Report an error to the user
*/
void ReportError( std::basic_string<TCHAR> message,
DWORD reason)
{
LPTSTR error_string;
if (reason != ERROR_SUCCESS)
{
if (::FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL,
reason,
0,
(LPTSTR)&error_string,
0,
NULL) != 0)
{
LPTSTR p = _tcschr(error_string, _T('\r'));
if(p != NULL)
{
*p = _T('\0');
}
message += _T(":\n");
message += error_string;
::LocalFree(error_string);
}
}
::MessageBox(NULL,message.c_str(),_T("AES Crypt Error"), MB_OK);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -