blob: 5147cfef2349eb62a15427980a8039a5543d2061 (
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
|
/**************************************************************************
*
* Copyright � Microsoft Corporation
*
* File Title: CapMan.h
*
* Project: Production Scanner Driver Sample
*
* Description: Contains the class declaration for CWIACapabilityManager
*
***************************************************************************/
#pragma once
#define MAX_CAPABILITY_STRING_SIZE_BYTES (sizeof(WCHAR) * MAX_PATH)
class CWIACapabilityManager
{
public:
CWIACapabilityManager();
~CWIACapabilityManager();
public:
HRESULT
Initialize(
_In_ HINSTANCE hInstance);
void
Destroy();
HRESULT
AddCapability(
const GUID guidCapability,
UINT uiNameResourceID,
UINT uiDescriptionResourceID,
ULONG ulFlags,
_In_ LPCWSTR wszIcon);
HRESULT
AllocateCapability(
_Out_ WIA_DEV_CAP_DRV **ppWIADeviceCapability);
void
FreeCapability(
_In_ WIA_DEV_CAP_DRV *pWIADeviceCapability,
BOOL bFreeCapabilityContentOnly = FALSE);
WIA_DEV_CAP_DRV*
GetCapabilities();
WIA_DEV_CAP_DRV*
GetCommands();
WIA_DEV_CAP_DRV*
GetEvents();
ULONG
GetNumCapabilities()
{
return (m_ulEvents + m_ulCommands);
}
ULONG
GetNumEvents()
{
return m_ulEvents;
}
ULONG
GetNumCommands()
{
return m_ulCommands;
}
private:
HINSTANCE m_hInstance;
CBasicDynamicArray<WIA_DEV_CAP_DRV> m_CapabilityArray;
ULONG m_ulEvents;
ULONG m_ulCommands;
};
|