Sha256: fb2eaf031c64a08dab6299d7fd4ce1590379cccd7173c778253f015ee8e74503

Contents?: true

Size: 1.74 KB

Versions: 8

Compression:

Stored size: 1.74 KB

Contents

#include "Stdafx.h"

extern "C" {
  __declspec(dllexport) void SelectionItem_Release(SelectionItemInformationPtr selectionItemInfo) {
    delete selectionItemInfo;
  }

  __declspec(dllexport) SelectionItemInformationPtr SelectionItem_Information(ElementInformationPtr element, char* errorInfo, const int errorInfoLength) {
    try {
      auto info = ElementFrom(element)->As<SelectionItemPattern^>(SelectionItemPattern::Pattern)->Current;
      return new SelectionItemInformation(info);
    } catch(Exception^ e) {
      StringHelper::CopyToUnmanagedString(e->Message, errorInfo, errorInfoLength);
      return NULL;
    }
  }

  __declspec(dllexport) void SelectionItem_Select(ElementInformationPtr element, char* errorInfo, const int errorInfoLength) {
    try {
      ElementFrom(element)->As<SelectionItemPattern^>(SelectionItemPattern::Pattern)->Select();
    } catch(Exception^ e) {
      StringHelper::CopyToUnmanagedString(e->Message, errorInfo, errorInfoLength);
    }
  }

  __declspec(dllexport) void SelectionItem_AddToSelection(ElementInformationPtr element, char* errorInfo, const int errorInfoLength) {
    try {
      ElementFrom(element)->As<SelectionItemPattern^>(SelectionItemPattern::Pattern)->AddToSelection();
    } catch(Exception^ e) {
      StringHelper::CopyToUnmanagedString(e->Message, errorInfo, errorInfoLength);
    }
  }

  __declspec(dllexport) void SelectionItem_RemoveFromSelection(ElementInformationPtr element, char* errorInfo, const int errorInfoLength) {
    try {
      ElementFrom(element)->As<SelectionItemPattern^>(SelectionItemPattern::Pattern)->RemoveFromSelection();
    } catch(Exception^ e) {
      StringHelper::CopyToUnmanagedString(e->Message, errorInfo, errorInfoLength);
    }
  }
}

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
uia-0.4.1 ext/UiaDll/UiaDll/SelectionItemMethods.cpp
uia-0.4 ext/UiaDll/UiaDll/SelectionItemMethods.cpp
uia-0.3.3 ext/UiaDll/UiaDll/SelectionItemMethods.cpp
uia-0.3.2 ext/UiaDll/UiaDll/SelectionItemMethods.cpp
uia-0.3.1 ext/UiaDll/UiaDll/SelectionItemMethods.cpp
uia-0.3 ext/UiaDll/UiaDll/SelectionItemMethods.cpp
uia-0.2.1 ext/UiaDll/UiaDll/SelectionItemMethods.cpp
uia-0.2 ext/UiaDll/UiaDll/SelectionItemMethods.cpp