blob: c23f5fb29aebe5fc3b8c72e485b107d4a147432c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
|
//+--------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// This source code is intended only as a supplement to Microsoft
// Development Tools and/or on-line documentation. See these other
// materials for detailed information regarding Microsoft code samples.
//
// THIS CODE AND INFORMATION ARE PROVIDED AS IS WITHOUT WARRANTY OF ANY
// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
//
// Abstract:
// WDK print filter sample.
// This is the header file for the stream filter sample.
//
//----------------------------------------------------------------------------
#ifndef _STREAM_FILTER_SAMPLE_HXX_
#define _STREAM_FILTER_SAMPLE_HXX_
class StreamFilter :
public IPrintPipelineFilter,
private DllLockManager
{
public:
StreamFilter();
//
// IUnknown methods
//
__override
STDMETHODIMP
QueryInterface(
_In_ REFIID riid,
_Out_ void **ppv
);
__override
STDMETHODIMP_(ULONG)
AddRef(
void
);
__override
STDMETHODIMP_(ULONG)
Release(
void
);
//
// IPrintPipelineFilter
//
__override
STDMETHODIMP
ShutdownOperation(
void
);
__override
STDMETHODIMP
InitializeFilter(
_In_ IInterFilterCommunicator *pINegotiation,
_In_ IPrintPipelinePropertyBag *pIPropertyBag,
_In_ IPrintPipelineManagerControl *pIPipelineControl
);
__override
STDMETHODIMP
StartOperation(
void
);
//
// Other methods
//
static
const GUID&
FilterClsid(
void
);
private:
enum
{
kBufferSize = 0x10000
};
Tools::SmartPtr<IPrintReadStream> m_pIRead;
Tools::SmartPtr<IPrintWriteStream> m_pIWrite;
Tools::SmartPtr<IPrintPipelineManagerControl> m_pIPipelineControl;
Tools::SmartPtr<IPrintPipelineProgressReport> m_pProgressReport;
bool m_bShutdown;
LONG m_cRef;
};
#endif // _STREAM_FILTER_SAMPLE_HXX_
|