From 96eb96dfb613e4c745db6bd1f53a92fe7e2290fc Mon Sep 17 00:00:00 2001 From: karlf Date: Thu, 11 Aug 2016 13:28:13 -0700 Subject: Updated for "Windows 10 Anniversary Update" (Version 1607) --- wia/ProdScan/stdafx.h | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 wia/ProdScan/stdafx.h (limited to 'wia/ProdScan/stdafx.h') diff --git a/wia/ProdScan/stdafx.h b/wia/ProdScan/stdafx.h new file mode 100644 index 00000000..f7f61586 --- /dev/null +++ b/wia/ProdScan/stdafx.h @@ -0,0 +1,87 @@ +/************************************************************************** +* +* Copyright © Microsoft Corporation +* +* File Title: stdafx.h +* +* Project: Production Scanner Driver Sample +* +* Description: precompiled header file +* +***************************************************************************/ + +#pragma once + +// +// This is the size of the buffer the driver uses to write data to the +// WIA image download stream and also to declare for legacy applications +// through WIA_IPA_BUFFER_SIZE. The buffer size chosen is 64KB (65536 bytes): +// +#define DEFAULT_BUFFER_SIZE 65536 + +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN +#endif + +#ifndef _UNICODE +#define _UNICODE +#endif + +// +// WIA_DEBUG is needed in order to enable WIA tracing in free +// builds (see WIAS_TRACE and WIAEX_ERROR in wiamdef.h): +// +#ifndef WIA_DEBUG +#define WIA_DEBUG +#endif + +// +// Windows system headers: +// + +#include // Windows +#include // C standard library +#include // std out +#include // COM +#include // COM +#include // Shell UI Extension +#include // Shell UI Extension +#include // Shell light weight API +#include // Safe character string APIs +#include // GDI+ +#include +#include + +// +// WIA driver core headers: +// +#include // STI defines +#include // IStiUsd interface +#include // IWiaMinidrv interface +#include // IWiaUIExtension interface +#include + +// +// WIA driver headers: +// +#include "constants.h" // Constant declarations +#include "basicarray.h" // CSimpleDynamicArray class +#include "propman.h" // WIA driver property manager class +#include "capman.h" // WIA driver capability manager class +#include "wiautil.h" // WIA driver helper functions +#include "resource.h" // WIA driver resource definitions +#include "minidrv.h" // WIA driver header + +// +// Helpers for image file format translations (using GDI+): +// +using namespace Gdiplus; +#include "fileconv.h" + +// +// WIA tracing macro helpers: +// +#define WIAEX_ERROR(args) { WIAS_ERROR((g_hInst, "Error in %s (%u):", __FUNCTION__, __LINE__)); WIAS_ERROR(args); } +#define WIAEX_TRACE(args) { FAILED(hr) ? WIAS_ERROR(args) : WIAS_TRACE(args); } +#define WIAEX_TRACE_FUNC_HR { FAILED(hr) ? WIAS_ERROR((g_hInst, "%s failed, hr = 0x%08X", __FUNCTION__, hr)) : WIAS_TRACE((g_hInst, "%s succeeded, hr = 0x%08X", __FUNCTION__, hr)); } +#define WIAEX_TRACE_BEGIN { WIAS_TRACE((g_hInst, "%s..", __FUNCTION__)); } -- cgit v1.3.1