Bug 82227

Summary: [OLE][API] Add the setByRef(IDispatch) method to Variant class
Product: [Eclipse Project] Platform Reporter: Hiroyuki Inaba <hiroyuki.inaba>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: niraj.modi, steve_northover
Version: 3.0.1Keywords: api, triaged
Target Milestone: ---   
Hardware: PC   
OS: Windows All   
Whiteboard:

Description Hiroyuki Inaba CLA 2005-01-05 06:43:10 EST
Version: Eclipse 3.0.1
Package: org.eclipse.swt.ole.win32
Class: Variant 

I want you to add the setByRef(IDispatch) method to the Variant class. 

I added the following codes and confirmed. 

public void setByRef(IDispatch val) {
	if ((type & COM.VT_BYREF) == 0 || (type & COM.VT_DISPATCH) == 0) {
		OLE.error(OLE.ERROR_CANNOT_CHANGE_VARIANT_TYPE);
	}
	COM.MoveMemory(byRefPtr, new int[]{val.getAddress()}, 4);
	val.AddRef();
}
Comment 1 Felipe Heidrich CLA 2009-08-13 11:30:50 EDT
Your bug has been moved to triage, visit http://www.eclipse.org/swt/triage.php for more info.