ext/UiaDll/UiaDll/ElementMethods.cpp in uia-0.4.2 vs ext/UiaDll/UiaDll/ElementMethods.cpp in uia-0.4.3

- old
+ new

@@ -6,11 +6,11 @@ extern "C" { Element^ ElementFrom(ElementInformationPtr element) { Element^ foundElement = nullptr; try { - if( element->nativeWindowHandle > 0 ) { - foundElement = Element::ByHandle(IntPtr(element->nativeWindowHandle)); + if( element->handle > 0 ) { + foundElement = Element::ByHandle(IntPtr(element->handle)); } else { foundElement = Element::ByRuntimeId(ArrayHelper::ToArray(element->runtimeId, element->runtimeIdLength)); } } catch(Exception^) { } \ No newline at end of file