-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathProvider.h
More file actions
45 lines (40 loc) · 1.56 KB
/
Provider.h
File metadata and controls
45 lines (40 loc) · 1.56 KB
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
/*************************************************************************************************
*
* Description: Declaration of the Provider class.
*
* 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.
*
*************************************************************************************************/
#include <UIAutomation.h>
#include <Uiautomationcore.h>
class Provider : public IRawElementProviderSimple,
public IInvokeProvider
{
public:
Provider(HWND hwnd);
// IUnknown methods
IFACEMETHODIMP_(ULONG) AddRef();
IFACEMETHODIMP_(ULONG) Release();
IFACEMETHODIMP QueryInterface(REFIID riid, void**);
// IRawElementProviderSimple methods
IFACEMETHODIMP get_ProviderOptions(ProviderOptions* pRetVal);
IFACEMETHODIMP GetPatternProvider(PATTERNID patternId, IUnknown** pRetVal);
IFACEMETHODIMP GetPropertyValue(PROPERTYID propertyId, VARIANT* pRetVal);
IFACEMETHODIMP get_HostRawElementProvider(IRawElementProviderSimple** pRetVal);
// IInvokeProvider methods
IFACEMETHODIMP Invoke();
private:
virtual ~Provider();
// Ref Counter for this COM object
ULONG m_refCount;
HWND m_controlHWnd; // The HWND for the control.
};