logo       

Re: generated stubs fail to compile: msg#00022

windows.devel.jawin

Subject: Re: generated stubs fail to compile

Hi Christophe,

On Mon, 17 Jul 2006 02:17:25 -0400, Christophe Grosjean
<christophe.grosjean@xxxxxxxxxxxxxxxxxxxxx> wrote:

>I tried to use the typebrowser to generate the stubs for Microsoft Word
>using the file MSWORD.olb from the MsOffice installation folder.
>
>But the collection of generated Java classes does not compile... It seems
>there are missing methods like Application.stealUnknown... In fact the
>Application class is almost empty (except the GUID).
>
>Any idea of what can I do ?

try to replace 'Application' by '_Application':

public _Application getApplication() throws COMException
{
_Application res = new _Application();
DispatchPtr dispPtr = (DispatchPtr)get("Application");
res.stealUnknown(dispPtr);
return res;
}

Of course the JaWin Stub _Application has to be available.

The same problem occurs in other typebrowser-created classes who try to
reference e.g. Document instead of _Document and so on. Usually there exists
a Stub class that implements DispatchPtr and this way inherits stealUnknown().

HTH
F. Schmitt



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise