sunpongber

生成基本的 v4 打印机驱动程序-Exception.cpp

//
// File Name:
//
//    Exception.cpp
//
// Abstract:
//
//    Exception routine definitions.
//

#include "precomp.h"
#include "WppTrace.h"
#include "CustomWppCommands.h"
#include "Exception.h"
#include "filtertypes.h"

#include "Exception.tmh"

namespace MyV4PrintDriver_Render_Filter
{

void ThrowHRException(
    HRESULT hr,
    char const *fileName,
    int lineNum
    )
{
    DoTraceMessage(
        RENDERFILTER_TRACE_ERROR,
        L"Throwing HRESULT Exception from %s:%d (HRESULT=%!HRESULT!)", 
        fileName, 
        lineNum, 
        hr
        );

    throw hr_error(hr);
}

} // namespace MyV4PrintDriver_Render_Filter

文件概述

代码结构与功能详解

  1. 头文件与预处理器
  1. 命名空间 namespace MyV4PrintDriver_Render_Filter
  1. 函数ThrowHRException
void ThrowHRException(
    HRESULT hr,
    char const *fileName,
    int lineNum
    )
{
    DoTraceMessage(
        RENDERFILTER_TRACE_ERROR,
        L"Throwing HRESULT Exception from %s:%d (HRESULT=%!HRESULT!)", 
        fileName, 
        lineNum, 
        hr
        );

    throw hr_error(hr);
}

代码总结

  1. 主要功能:
  1. 关键点:
  1. 应用场景:
  1. WPP 跟踪:

原始资料地址:
生成基本的 v4 打印机驱动程序
如有侵权联系删除 仅供学习交流使用