/****************************************************************************** バグベアード -bugbeard- サンプル "win.cpp" ソースファイル Coded by Wraith in Feb 18, 2008. ******************************************************************************/ /////////////////////////////////////////////////////////////////////////////// // // includes // #include #include /////////////////////////////////////////////////////////////////////////////// // // [BUG]bugbeard // #if defined(NDEBUG) #define BUG_DISABLE_BUGBEARD // リリース版ではバグベアードをロードしない #endif #define BUG_EVIL_CONTRACT // "悪魔の契約" #include "bug.h" // ロガーを定義する為にステートメントハックを有効にしない状態で include // OutputDebugString() でツリー形式の出力を行うロガーの定義 BUG_define_logger(new bugbeard::bug_tree_logger(new bugbeard::bug_OutputDebugString_writer())); #define BUG_STATEMENT_HACK // ステートメントハックの設定 #include "bug.h" // ステートメントハックを有効にする為、再度 include /////////////////////////////////////////////////////////////////////////////// // // user codes // int main(int argc, char * args[]) { argc, args; // 警告除け puts("このサンプルでは Win32API の OutputDebugString() でログを出力しています。"); puts("ご利用のIDEのデバッグ出力表示機能や sysinternals の DebugView などで出力内容を確認できます。"); // [BUG]コンパイル情報のログ出力 BUG_exec(bugbeard::bug_compile_info(BUG_LOG)); // [BUG]コマンドライン引数のログ出力 BUG_exec(bugbeard::bug_arg_info(BUG_LOG, argc, args)); // [BUG]Windowsバージョン情報のログ出力 BUG_exec(bugbeard::bug_windows_version_info(BUG_LOG)); // [BUG]Windowsシステム情報のログ出力 BUG_exec(bugbeard::bug_windows_system_info(BUG_LOG)); #if 0x0500 <= WINVER // [BUG]各種モジュールバージョン情報のログ出力 BUG_exec(bugbeard::bug_enum_module_version_info(BUG_LOG)); #endif #if 0x0500 <= WINVER // [BUG]各種モジュールハッシュ値のログ出力 BUG_exec(bugbeard::bug_enum_module_hash(BUG_LOG)); #endif #if 0x0500 <= WINVER // [BUG]メモリ情報のログ出力 BUG_exec(bugbeard::bug_memory_info(BUG_LOG)); #endif // [BUG]ドライブ情報のログ出力 BUG_exec(bugbeard::bug_enum_drive_info(BUG_LOG)); #if 0x0500 <= WINVER // [BUG]モニター情報のログ出力 BUG_exec(bugbeard::bug_enum_monitor_info(BUG_LOG)); // [BUG]ディスプレイ情報のログ出力 BUG_exec(bugbeard::bug_enum_display_info(BUG_LOG)); #endif // [BUG](全ての)環境変数情報のログ出力 BUG_exec(bugbeard::bug_enum_env(BUG_LOG)); return EXIT_SUCCESS; } /****************************************************************************** □■□■ Wraith the Trickster □■□■ ■□■□ 〜I'll go with heaven's advantage and fool's wisdom.〜 ■□■□ ******************************************************************************/