Sha256: 79b989410f182468d697e8012b5faa3819ebeb7edde7af5ece28bdf99fe9da6e

Contents?: true

Size: 1.1 KB

Versions: 8

Compression:

Stored size: 1.1 KB

Contents

#include "Stdafx.h"

extern "C" {
  __declspec(dllexport) void Selection_Release(SelectionInformationPtr selectionInfo) {
    delete selectionInfo;
  }

  __declspec(dllexport) SelectionInformationPtr Selection_Information(ElementInformationPtr element, char* errorInfo, const int errorInfoLength) {
    try {
      return new SelectionInformation(ElementFrom(element)->As<SelectionPattern^>(SelectionPattern::Pattern)->Current);
    } catch(Exception^ e) {
      StringHelper::CopyToUnmanagedString(e, errorInfo, errorInfoLength);
      return NULL;
    }
  }

  __declspec(dllexport) int Selection_Selections(ElementInformationPtr element, ElementInformation** selections, char* errorInfo, const int errorInfoLength) {
    try {
      auto selectedElements = Element::From(ElementFrom(element)->As<SelectionPattern^>(SelectionPattern::Pattern)->Current.GetSelection());
      *selections = ElementInformation::From(selectedElements);
      return selectedElements->Length;
    } catch(Exception^ e) {
      StringHelper::CopyToUnmanagedString(e, errorInfo, errorInfoLength);
      return 0;
    }
  }
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
uia-0.8 ext/UiaDll/UiaDll/SelectionMethods.cpp
uia-0.7 ext/UiaDll/UiaDll/SelectionMethods.cpp
uia-0.7.alpha.1 ext/UiaDll/UiaDll/SelectionMethods.cpp
uia-0.6 ext/UiaDll/UiaDll/SelectionMethods.cpp
uia-0.5 ext/UiaDll/UiaDll/SelectionMethods.cpp
uia-0.4.4 ext/UiaDll/UiaDll/SelectionMethods.cpp
uia-0.4.3 ext/UiaDll/UiaDll/SelectionMethods.cpp
uia-0.4.2 ext/UiaDll/UiaDll/SelectionMethods.cpp