Sha256: 4325cebb2a9b754e658cc9a0e4b2c38f6074c00ec76f6f1d49ebc863f2ff8b11

Contents?: true

Size: 1.57 KB

Versions: 5

Compression:

Stored size: 1.57 KB

Contents

#include "Stdafx.h"

extern "C" {
  __declspec(dllexport) void Table_Release(TableInformationPtr tableInfo) {
    delete tableInfo;
  }

  __declspec(dllexport) TableInformationPtr Table_Information(ElementInformationPtr element, char* errorInfo, const int errorInfoLength) {
    try {
      return new TableInformation(ElementFrom(element)->As<TablePattern^>(TablePattern::Pattern)->Current);
    } catch(Exception^ e) {
      StringHelper::CopyToUnmanagedString(e->Message, errorInfo, errorInfoLength);
      return NULL;
    }
  }

  __declspec(dllexport) int Table_Headers(ElementInformationPtr element, ElementInformation** headers, char* errorInfo, const int errorInfoLength) {
    try {
      auto headerElements = ElementFrom(element)->As<TablePattern^>(TablePattern::Pattern)->Current.GetColumnHeaders();
      *headers = ElementInformation::From(Element::From(headerElements));
      return headerElements->Length;
    } catch(Exception^ e) {
      StringHelper::CopyToUnmanagedString(e->Message, errorInfo, errorInfoLength);
      return 0;
    }
  }

  __declspec(dllexport) ElementInformationPtr Table_Row(ElementInformationPtr element, const int index, char* errorInfo, const int errorInfoLength) {
    try {
      auto table = ElementFrom(element);
      return ElementInformation::From(table->Find(TreeScope::Children, gcnew PropertyCondition(AutomationElement::ControlTypeProperty, ControlType::DataItem))[index]);
    } catch(Exception^ e) {
      StringHelper::CopyToUnmanagedString(e->Message, errorInfo, errorInfoLength);
      return NULL;
    }
  }
}

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
uia-0.4.1 ext/UiaDll/UiaDll/TableMethods.cpp
uia-0.4 ext/UiaDll/UiaDll/TableMethods.cpp
uia-0.3.3 ext/UiaDll/UiaDll/TableMethods.cpp
uia-0.3.2 ext/UiaDll/UiaDll/TableMethods.cpp
uia-0.3.1 ext/UiaDll/UiaDll/TableMethods.cpp