Re: org.jawin.COMException: 80020006: Unknown name. Oops! Read this copy!

Erran Berger <[email protected]>
Newsgroups gmane.comp.windows.devel.jawin
Message-ID <[email protected]>
Thanks for your quick response Stefan.  That clarifies my error, but not
quite why it is I'm getting it.  An interesting sidenote - I 

I forgot to mention one more thing regarding this scenario - the first few
iterations of the loop work fine.  I have managed to get it to loop anywhere
from 4 to 12 times, making all COM calls successfully, before it breaks.  

As I was writing this email I recompiled my DLL and re-tested it.  All of a
sudden I get no errors.  

Does this make any sense to anyone?  

There is one last possibility - I am a COM nubie and was forced to develop
my one stub DLL as I wait on another group to supply me with the real one.
Perhaps I messed something up in my VB code?

Any more suggestions?

Thanks,
Erran
-----Original Message-----
From: Discussion of Java/Win32/COM integration with Jawin
[mailto:[email protected]] On Behalf Of Stefan Zschocke
Sent: Friday, November 12, 2004 12:55 AM
To: [email protected]
Subject: Re: [JAWIN] org.jawin.COMException: 80020006: Unknown name. Oops!
Read this copy!

Hi, 0x80020006 is DISP_E_UNKNOWNNAME. This means that the invokation
fails, prbly GetIDsOfNames. 
Seems that the wrapper-generater has generated malfunctioning wrappers.
The method name AddItem could not be resolved.
Stefan
http://www.jacoZoom.com - Java/COM bridge 

-----Ursprüngliche Nachricht-----
Von: Discussion of Java/Win32/COM integration with Jawin
[mailto:[email protected]] Im Auftrag von Erran Berger
Gesendet: Freitag, 12. November 2004 05:13
An: [email protected]
Betreff: [JAWIN] org.jawin.COMException: 80020006: Unknown name. Oops!
Read this copy!


Hello all,

I've been developing with Jawin for the past couple of weeks having only
modest success.  Finally I've successfully managed to communicate with
my COM object and now I'm having more problems.  Here's a description:

I have a COM object with about 10 functions, taking a variety of
parameters.  I was curious to see how my little Java-COM bridge would
hold up under a bit of stress so I am iteratively calling almost all of
the functions on the object, like so:

>>OrderRunner.java (single main thread)

comclient = new _ComClient(ComClient.CLSID)
for (int i=0; i<50; i++)

comclient.startTransaction(...)
comclient.addItem(...)        //Various in & out & opt params
comclient.addCondiment(...)
comclient.addTax(...)
comclient.addTender(...)      //Various in & out & opt params
}
comclient.close(...)

<<

When I run this, I get the following exception:

org.jawin.COMException: 80020006: Unknown name.

 at org.jawin.marshal.GenericStub.dispatchInvoke0(Native Method)  at
org.jawin.marshal.GenericStub.dispatchInvoke
(GenericStub.java:201)
 at org.jawin.DispatchPtr.invokeN(DispatchPtr.java:587)
 at org.jawin.DispatchPtr.invokeN(DispatchPtr.java:555)
at ..._ComClient.AddItem(MatraCOMWrapper.java:211)
 ...OrderRunner.run2(MatraOrderRunner.java:67)
...TestClient.main(MatraAPITestClient.java:32)

I commented addItem and addTender, because when I comment out the
setting of out parameters (Variant/String types)in AddTender() (in my
COM dll) , then I dont get the exception.  For the record, I am using
Variant.ByrefHolder instances to contain Variant/Str classes on the Java
side.  Anyway - I'm clueless as to why this setting of out these
parameters in my COM object causes Jawin to fail.

Thanks for your help and sorry for the duplicate email,
- Erran
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.