Skip to main content



      Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » OleAutomation wrapper code generator
OleAutomation wrapper code generator [message #461329] Tue, 20 September 2005 17:15 Go to next message
Eclipse UserFriend
Was wondering if there were any code gen tools out there to help wrap an
ActiveX control with the OleAutomation class. Seems it'd be possible to
query the interface of the ActiveX and code gen Java code to help
automate methods like this one:

6 public void loadFile(String file)
7 {
8 showPdfControl();
9
10 int[] rgdispid = auto.getIDsOfNames(newString[]{"LoadFile"});
11 int dispIdMember = rgdispid[0];
12
13 Variant[] rgvarg = new Variant[1];
14 rgvarg[0] = new Variant(file);
15
16 Variant pVarResult =auto.invoke(dispIdMember,rgvarg);
17 }

--
Chris
http://clabs.org
Re: OleAutomation wrapper code generator [message #461331 is a reply to message #461329] Tue, 20 September 2005 17:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: omry_y.inter.net.il

I pretty much asked the same question a few days ago.
no response yet.
if you managed to get things working with OLE, I would appriciate it if
you will take a look at at my past question about OLE and
Word.Application.Documents.Open file

thanks.


Chris Morris wrote:
> Was wondering if there were any code gen tools out there to help wrap an
> ActiveX control with the OleAutomation class. Seems it'd be possible to
> query the interface of the ActiveX and code gen Java code to help
> automate methods like this one:
>
> 6 public void loadFile(String file)
> 7 {
> 8 showPdfControl();
> 9
> 10 int[] rgdispid = auto.getIDsOfNames(newString[]{"LoadFile"});
> 11 int dispIdMember = rgdispid[0];
> 12
> 13 Variant[] rgvarg = new Variant[1];
> 14 rgvarg[0] = new Variant(file);
> 15
> 16 Variant pVarResult =auto.invoke(dispIdMember,rgvarg);
> 17 }
>
Re: OleAutomation wrapper code generator [message #461734 is a reply to message #461331] Wed, 28 September 2005 17:16 Go to previous message
Eclipse UserFriend
You could try modifying the following snippet to generate code for a
specified OleAutomation object:

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


<omry_y@inter.net.il> wrote in message news:dgpvd8$828$1@news.eclipse.org...
>I pretty much asked the same question a few days ago.
> no response yet.
> if you managed to get things working with OLE, I would appriciate it if
> you will take a look at at my past question about OLE and
> Word.Application.Documents.Open file
>
> thanks.
>
>
> Chris Morris wrote:
>> Was wondering if there were any code gen tools out there to help wrap an
>> ActiveX control with the OleAutomation class. Seems it'd be possible to
>> query the interface of the ActiveX and code gen Java code to help
>> automate methods like this one:
>>
>> 6 public void loadFile(String file)
>> 7 {
>> 8 showPdfControl();
>> 9
>> 10 int[] rgdispid = auto.getIDsOfNames(newString[]{"LoadFile"});
>> 11 int dispIdMember = rgdispid[0];
>> 12
>> 13 Variant[] rgvarg = new Variant[1];
>> 14 rgvarg[0] = new Variant(file);
>> 15
>> 16 Variant pVarResult =auto.invoke(dispIdMember,rgvarg);
>> 17 }
>>
Previous Topic:Force Shell Focus
Next Topic:Table.Class (in Pocket PC) NoClassDefFoundError
Goto Forum:
  


Current Time: Fri Jul 25 11:20:15 EDT 2025

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

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

Back to the top