NVDA Helper
In-process and lite high-speed utilities for NVDA
utils.cpp File Reference
#include <vector>
#include <UIAutomation.h>
#include <comutil.h>
#include "utils.h"

Go to the source code of this file.

Functions

std::vector< intSafeArrayToVector (SAFEARRAY *pSafeArray)
 creates a vector of ints from a SAFEARRAY.
 
std::vector< intgetRuntimeIDFromElement (IUIAutomationElement *pElement)
 Fetches the runtimeID from a given uI Automation element.
 

Function Documentation

◆ SafeArrayToVector()

std::vector< int > SafeArrayToVector ( SAFEARRAY * pSafeArray)

creates a vector of ints from a SAFEARRAY.

Parameters
pSafeArray
Returns
the vector of ints.

References HRESULT().

Referenced by getRuntimeIDFromElement().

◆ getRuntimeIDFromElement()

std::vector< int > getRuntimeIDFromElement ( IUIAutomationElement * pElement)

Fetches the runtimeID from a given uI Automation element.

Parameters
pElementthe UI Automation element whose runtime ID should be fetched.
Returns
the runtime ID from the element.

References HRESULT(), and SafeArrayToVector().

Referenced by ActiveTextPositionChangedEventRecord_t::generateCoalescingKey(), AutomationEventRecord_t::generateCoalescingKey(), FocusChangedEventRecord_t::generateCoalescingKey(), NotificationEventRecord_t::generateCoalescingKey(), and PropertyChangedEventRecord_t::generateCoalescingKey().