Sha256: 3be0ad0672a79311f42b01075a80bde9304c531e795a2c64c52ed77b571eccfe

Contents?: true

Size: 1.87 KB

Versions: 12

Compression:

Stored size: 1.87 KB

Contents

#include "stdafx.h"
#include "MenuItemSelector.h"

BOOL MenuItemExists(const HWND windowHandle, std::list<const char*>& menuItems);
void MenuSelectPath(const HWND windowHandle, char* errorInfo, const int errorInfoSize, std::list<const char*>& menuItems);

extern "C" {

  #pragma managed(push, off)
	__declspec ( dllexport ) void Menu_SelectPath(const HWND windowHandle, char* errorInfo, const int errorInfoSize, const char* arg0, ...) {
		va_list arguments;
		va_start(arguments, arg0);			

		std::list<const char*> menuItems;

		const char* lastArgument = arg0;
		while( NULL != lastArgument ) {
			menuItems.push_back(lastArgument);
			lastArgument = va_arg(arguments, const char*);
		}
		va_end(arguments);

		MenuSelectPath(windowHandle, errorInfo, errorInfoSize, menuItems);
	}
  #pragma managed(pop)

  #pragma managed(push, off)
	__declspec ( dllexport ) BOOL Menu_ItemExists(const HWND windowHandle, const char* arg0, ...) {
		va_list arguments;
		va_start(arguments, arg0);			

		std::list<const char*> menuItems;

		const char* lastArgument = arg0;
		while( NULL != lastArgument ) {
			menuItems.push_back(lastArgument);
			lastArgument = va_arg(arguments, const char*);
		}
		va_end(arguments);

		return MenuItemExists(windowHandle, menuItems);
	}
  #pragma managed(pop)
}

BOOL MenuItemExists(const HWND windowHandle, std::list<const char*>& menuItems)
{
	auto menuSelector = gcnew MenuItemSelector();
	return menuSelector->MenuItemExists(windowHandle, menuItems);
}

void MenuSelectPath(const HWND windowHandle, char* errorInfo, const int errorInfoSize, std::list<const char*>& menuItems)
{
	try {
		auto menuSelector = gcnew MenuItemSelector();
		menuSelector->SelectMenuPath(windowHandle, menuItems);
	} catch(Exception^ e) {
		if( errorInfo ) {
			StringHelper::CopyToUnmanagedString(e->ToString(), errorInfo, errorInfoSize);
		}
	}
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rautomation-2.0.1-x86-mingw32 ext/UiaDll/UiaDll/MenuMethods.cpp
rautomation-2.0.1-x64-mingw32 ext/UiaDll/UiaDll/MenuMethods.cpp
rautomation-1.1.0 ext/UiaDll/UiaDll/MenuMethods.cpp
rautomation-1.0.0 ext/UiaDll/UiaDll/MenuMethods.cpp
rautomation-0.17.0 ext/UiaDll/UiaDll/MenuMethods.cpp
rautomation-0.16.0 ext/UiaDll/UiaDll/MenuMethods.cpp
rautomation-0.15.0 ext/UiaDll/UiaDll/MenuMethods.cpp
rautomation-0.14.1 ext/UiaDll/UiaDll/MenuMethods.cpp
rautomation-0.14.0 ext/UiaDll/UiaDll/MenuMethods.cpp
rautomation-0.13.0 ext/UiaDll/UiaDll/MenuMethods.cpp
rautomation-0.12.0 ext/UiaDll/UiaDll/MenuMethods.cpp
rautomation-0.11.0 ext/UiaDll/UiaDll/MenuMethods.cpp