summaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
Diffstat (limited to 'print')
-rw-r--r--print/XPSDrvSmpl/ReadMe.md77
-rw-r--r--print/XpsRasFilter/ReadMe.md14
-rw-r--r--print/autoconfig/ReadMe.md6
-rw-r--r--print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension/ReadMe.md23
4 files changed, 33 insertions, 87 deletions
diff --git a/print/XPSDrvSmpl/ReadMe.md b/print/XPSDrvSmpl/ReadMe.md
index 659f442a..bbf1948b 100644
--- a/print/XPSDrvSmpl/ReadMe.md
+++ b/print/XPSDrvSmpl/ReadMe.md
@@ -3,7 +3,7 @@ XPSDrv Driver and Filter Sample
This sample is intended to provide a starting point for developing XPSDrv printer drivers and to illustrate the facility and potential of an XPSDrv print driver. This goal is accomplished by implementing a number of real-world features within a set of XPS print pipeline filters that are configured through a configuration plug-in that supports custom UI content and PrintTicket handling.
-Windows Vista introduced a new print architecture and a new document format known as XPS (XML Paper Specification). Part of the new architecture is the XPSDrv print driver, which is designed to provide a flexible, extensible path to manipulate and print an XPS spool file through a series of filters.
+Windows includes a print architecture and a document format known as XPS (XML Paper Specification). Part of the new architecture is the XPSDrv print driver, which is designed to provide a flexible, extensible path to manipulate and print an XPS spool file through a series of filters.
This sample is intended to provide a starting point for developing XPSDrv printer drivers and to illustrate the facility and potential of an XPSDrv print driver. This goal is accomplished by implementing a number of real-world features within a set of XPS print pipeline filters that are configured through a configuration plug-in that supports custom UI content and PrintTicket handling.
@@ -13,41 +13,26 @@ The sample broadly consists of three components: a set of filters, a configurati
Build the sample
----------------
-To build a driver solution using Windows 8.1 driver kit (WDK 8.1) and Visual Studio 2013, perform the following steps.
+To build a driver solution using Windows Driver Kit (WDK) 10 and Visual Studio 2015, perform the following steps.
-1. Open the solution file in Visual Studio 2013
+1. Open the solution file in Visual Studio 2015.
+2. Add all non-binary files (usually located in the \\install directory of the sample) to the Package project:
+ a. In the **Solution Explorer**, right click **Driver Files**
+ b. Select **Add**, then click **Existing Item**
+ c. Navigate to the location to which you downloaded the sample, and select all the files in the install directory, or the equivalent set of non-binary files such as INFs, INIs, GPD, PPD files, etc.
+ d. Click **Add**
+3. Configure these files to be added into the driver package:
+ a. In the **Solution Explorer**, right click on the solution and choose **Add** > **New Project**. Choose **Driver Install Package** under Visual C++/Windows Driver/Package.
+ b. In the **Solution Explorer**, right click the Package project and select **Properties**.
+ c. In the left pane, click **Configuration Properties** \> **Driver Install** \> **Package Files**.
+ d. In the right pane, use the ellipsis button (...) to browse to the set of files that needs to be added to the driver package. All the data files that you added in **Step 2-c**, except the INF file, should be added.  This configuration is per-architecture, so this configuration must be repeated for each architecture that will be built.
+ e. Click **OK**.
+4. Open the INF file and edit it to match the built output.
+ a. Open the INF file.
+ b. In the Version section, add a reference to a catalog file like this: CatalogFile=XpsDrvSmpl.cat.
+ c. In the SourceDisksFiles section, change the location of the DLL files you are building, to =1. This indicates that there is no architecture specific directory in this driver. If you ship multiple architectures simultaneously, you will need to collate the driver INF manually.
-2. Add all non-binary files (usually located in the \\install directory of the sample) to the Package project
-
-a. In the **Solution Explorer**, right click **Driver Files**
-
-b. Select **Add**, then click **Existing Item**
-
-c. Navigate to the location to which you downloaded the sample, and select all the files in the install directory, or the equivalent set of non-binary files such as INFs, INIs, GPD, PPD files, etc.
-
-d. Click **Add**
-
-3. Configure these files to be added into the driver package
-
-a. In the **Solution Explorer**, right click the Package project and select **Properties**
-
-b. In the left pane, click **Configuration Properties** \> **Driver Install** \> **Package Files**.
-
-c. In the right pane, use the ellipsis button (...) to browse to the set of files that needs to be added to the driver package. All the data files that you added in **Step 2-c**, except the INF file, should be added.
-
-**Note**  This configuration is per-architecture, so this configuration must be repeated for each architecture that will be built.
-
-d. Click **OK**
-
-4. Open the INF file and edit it to match the built output
-
-a. Open the INF file
-
-b. In the Version section, add a reference to a catalog file like this: CatalogFile=XpsDrvSmpl.cat
-
-c. In the SourceDisksFiles section, change the location of the DLL files you are building, to =1. This indicates that there is no architecture specific directory in this driver. If you ship multiple architectures simultaneously, you will need to collate the driver INF manually.
-
-At this point, Visual Studio 2013 will be able to build a driver package and output the files to disk. In order to configure driver signing and deployment, see [Developing, Testing, and Deploying Drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554651(v=vs.85).aspx).
+At this point, Visual Studio 2015 will be able to build a driver package and output the files to disk. In order to configure driver signing and deployment, see [Developing, Testing, and Deploying Drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554651(v=vs.85).aspx).
**Note**  If you compile your sample driver with Microsoft Visual Studio version 10, or 11 with the \_DEBUG flag set, then you should not use CComVariant on the following two XPS Print Filter Pipeline properties:
@@ -56,32 +41,18 @@ At this point, Visual Studio 2013 will be able to build a driver package and ou
There is a known issue with the current implementation of the Print Filter Pipeline, where the variant type for these two properties is set to VT\_BYREF. And as a result of this known issue, any filter binary that is compiled with the \_DEBUG flag set will experience the ATLASSERT() failure. This is because when you use the CComVariant, its destructor checks the returned value from the Clear() function, as shown:
-<table>
-<colgroup>
-<col width="100%" />
-</colgroup>
-<thead>
-<tr class="header">
-<th align="left">C++</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td align="left"><pre><code>~CComVariant() throw()
+
+```c_cpp
+~CComVariant() throw()
{
HRESULT hr = Clear();
ATLASSERT(SUCCEEDED(hr));
(hr);
-}</code></pre></td>
-</tr>
-</tbody>
-</table>
+}
+```
When you compile this sample driver with Visual Studio version 9, you don't experience this problem because the destructor for CComVariant doesn't perform this check on the returned value from the Clear() function.
-Run the sample
---------------
-
Installation
------------
diff --git a/print/XpsRasFilter/ReadMe.md b/print/XpsRasFilter/ReadMe.md
index 2dc4fe52..3a88ca71 100644
--- a/print/XpsRasFilter/ReadMe.md
+++ b/print/XpsRasFilter/ReadMe.md
@@ -1,11 +1,7 @@
XPS Rasterization Filter Service Sample
=======================================
-This sample implements an XPSDrv filter that rasterizes fixed pages in an XPS document. Hardware vendors can modify this sample to build an XPSDrv filter that produces bitmap images for their printers or other display devices. The sample uses the XPS Rasterization Service in Windows 7. The sample does not run in versions of Windows before Windows 7.
-
-This document describes the contents and use of the XPS Rasterization Service Filter sample included in the Windows 7 WDK. This document will serve as a point-of-reference to gather and draft the information required for the MSDN entries to accompany the sample prior to flowing this text and information into the appropriate MSDN format.
-
-The XPS Rasterization Service creates rasterizer objects for use by XPSDrv filters. A rasterizer object takes an XPS Object Model (XPS OM) page object and creates a bitmap of a specified region of the page. The sample implements an XPSDrv filter (xpsrasfilter.dll) that can be inserted into the XPS Filter Pipeline. For each fixed page in an XPS document, the sample filter does the following:
+This sample implements an XPSDrv filter that rasterizes fixed pages in an XPS document. Hardware vendors can modify this sample to build an XPSDrv filter that produces bitmap images for their printers or other display devices. The sample uses the XPS Rasterization Service that creates rasterizer objects for use by XPSDrv filters. A rasterizer object takes an XPS Object Model (XPS OM) page object and creates a bitmap of a specified region of the page. The sample implements an XPSDrv filter (xpsrasfilter.dll) that can be inserted into the XPS Filter Pipeline. For each fixed page in an XPS document, the sample filter does the following:
- Uses the XPS rasterization service to create a rasterizer object for the fixed page.
- Partitions the fixed page into several horizontal bands.
@@ -28,11 +24,3 @@ The default parameters in this sample are as follows:
- Scaling is set to FitApplicationBleedSizeToImageableSize.
- •Destination resolution set to 96 dpi (can override in print ticket).
-**Note**  
-
-To build this sample, you can use Microsoft Visual Studio 2013 (Professional, or Ultimate) and Windows Driver Kit (WDK) 8.1 Update. This sample will not build with Microsoft Visual Studio Express 2013 for Windows Desktop, because the sample uses Active Template Library (ATL). You can get Visual Studio 2013 and WDK 8.1 Update [here](http://go.microsoft.com/fwlink/p/?LInkID=239721).
-
-You can also build this sample with Visual Studio 2013 (Professional or Ultimate) and [Windows Driver Kit (WDK) 8.1](http://go.microsoft.com/fwlink/p/?LInkID=391348).
-
-For Windows Driver Kit (WDK) 8 samples, download the [WDK 8 samples pack](%20http://go.microsoft.com/fwlink/?LinkId=317090). The samples in the WDK 8 samples pack will build only with Microsoft Visual Studio Professional 2012 (Professional or Ultimate) and WDK 8.
-
diff --git a/print/autoconfig/ReadMe.md b/print/autoconfig/ReadMe.md
index 21ee2294..821e1897 100644
--- a/print/autoconfig/ReadMe.md
+++ b/print/autoconfig/ReadMe.md
@@ -19,9 +19,9 @@ Build the sample
The auto-configuration sample doesn’t have any binaries to be built. It may be installed by using **Add Printer Wizard** and supplying the AutoCnfg.INF as the INF file.
-But to build a signed driver package using Windows Driver Kit (WDK) 10 and Visual Studio 2015, for the project file (csproj) that ships with the auto-configuration sample, perform the following steps.
+But to build a signed driver package using Windows Driver Kit (WDK) 10 and Visual Studio 2015, for the project file (csproj) that ships with the auto-configuration sample, perform the following steps.
-1. Open the solution file in Visual Studio 2015.
+1. Open the solution file in Visual Studio 2015.
2. On the **Build** menu, select **Configuration Manager...**.
@@ -29,7 +29,7 @@ But to build a signed driver package using Windows Driver Kit (WDK) 10 and Visua
**Note**  When the driver builds, it will be placed in the output folder for the architecture you selected.
-At this point, Visual Studio will be able to build a driver package and output the files to disk. In order to configure driver signing and deployment, see [Developing, Testing, and Deploying Drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554651(v=vs.85).aspx).
+At this point, Visual Studio will be able to build a driver package and output the files to disk. In order to configure driver signing and deployment, see [Developing, Testing, and Deploying Drivers](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554651(v=vs.85).aspx).
For more information about how to build a driver solution using Microsoft Visual Studio, see [Building a Driver](http://msdn.microsoft.com/en-us/library/windows/hardware/ff554644).
diff --git a/print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension/ReadMe.md b/print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension/ReadMe.md
index 2b0528d3..753af28b 100644
--- a/print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension/ReadMe.md
+++ b/print/v4PrintDriverSamples/v4PrintDriver-USBMon-Bidi-Extension/ReadMe.md
@@ -12,33 +12,20 @@ For more information, see [USB Bidi Extender](http://msdn.microsoft.com/en-us/li
**Note**  This sample is for the v4 print driver model.
-**Note**  When you make calls to printerStream.read() in the sample, the printer returns an array which includes an additional element that represents the array length. The following code snippet can be used to copy the returned array into a new array, and also to remove the additional element.
+**Note**  When you make calls to printerStream.read() in the sample, the printer returns an array which includes an additional element that represents the array length. The following JavaScript code can be used to copy the returned array into a new array, and also to remove the additional element.
-<table>
-<colgroup>
-<col width="100%" />
-</colgroup>
-<thead>
-<tr class="header">
-<th align="left">JavaScript</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td align="left"><pre><code>var readBuffer = [];
+```
+var readBuffer = [];
var readBytes = 0;
var readSize = 4096;
readBuffer = printerStream.read( readSize );
readBytes = readBuffer.length;
-
var cleanArray = [];
for ( i = 0; i &lt; readBytes; i++ ) {
cleanArray[i] = readBuffer.shift();
-}</code></pre></td>
-</tr>
-</tbody>
-</table>
+}
+```