ext/UiaDll/UiaDll/ElementMethods.cpp in uia-0.0.7.3 vs ext/UiaDll/UiaDll/ElementMethods.cpp in uia-0.0.8

- old
+ new

@@ -13,16 +13,20 @@ __declspec(dllexport) void Element_Release(ElementInformationPtr elementInformation) { delete elementInformation; } - __declspec(dllexport) void Element_ReleaseMany(ElementsPtr elements) { - delete elements; - } - __declspec(dllexport) void Element_Refresh(ElementInformationPtr element, char* errorInfo, const int errorInfoLength) { try { element->Refresh(Find(element)); + } catch(Exception^ e) { + StringHelper::CopyToUnmanagedString(e->Message, errorInfo, errorInfoLength); + } + } + + __declspec(dllexport) void Element_SendKeys(ElementInformationPtr element, const char* keysToSend, char* errorInfo, const int errorInfoLength) { + try { + Find(element)->SendKeys(gcnew String(keysToSend)); } catch(Exception^ e) { StringHelper::CopyToUnmanagedString(e->Message, errorInfo, errorInfoLength); } } \ No newline at end of file