Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Variant ByRef
Variant ByRef [message #457223] Tue, 21 June 2005 22:38 Go to next message
Eclipse UserFriend
Originally posted by: mcheung.equilar.com

How do i pass a referenced variant into a OLE method? I am not able to
create a Variant object as reference and pass into invoke method. Does
anybody knows how? In the class, Variant, they have a constructor that allow
you to create it by pointer and type.

new Variant(ptr, OLE.VT_BSTR | OLE.VT_BYREF);

Such Variant will hold the pointer of the value, one can use setByRef() to
change the value using this reference.
Re: Variant ByRef [message #457226 is a reply to message #457223] Tue, 21 June 2005 22:58 Go to previous message
Eclipse UserFriend
Originally posted by: mcheung.equilar.com

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.swt.sni ppets/src/org/eclipse/swt/snippets/Snippet186.java?rev=HEAD& amp;content-type=text/vnd.viewcvs-markup

This is similar to what I am looking for, but instead of creating a variant
reference to the safearray, I need it to point to the integer value. I can't
figure how to alloc the memory and point it back from the variant reference.

Thanks,

Michael

"Michael Cheung" <mcheung@equilar.com> wrote in message
news:d9a4sv$gto$1@news.eclipse.org...
> How do i pass a referenced variant into a OLE method? I am not able to
> create a Variant object as reference and pass into invoke method. Does
> anybody knows how? In the class, Variant, they have a constructor that
> allow you to create it by pointer and type.
>
> new Variant(ptr, OLE.VT_BSTR | OLE.VT_BYREF);
>
> Such Variant will hold the pointer of the value, one can use setByRef() to
> change the value using this reference.
>
Previous Topic:Aligning text in tables
Next Topic:OLE Drag And Drop
Goto Forum:
  


Current Time: Thu Apr 25 22:18:49 GMT 2024

Powered by FUDForum. Page generated in 0.03025 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top