/******************************************************************************* * Copyright (c) 2000, 2017 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.swt.internal.ole.win32; import org.eclipse.swt.internal.*; import org.eclipse.swt.internal.win32.*; public class IDispatch extends IUnknown { public IDispatch(long address) { super(address); } public int GetIDsOfNames(GUID riid, String[] rgszNames, int cNames, int lcid, int[] rgDispId) { char[] buffer; int size = rgszNames.length; // create an array to hold the addresses long hHeap = OS.GetProcessHeap(); long ppNames = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, size * C.PTR_SIZEOF); long[] memTracker = new long[size]; try { // add the address of each string to the array for (int i=0; i