What causes a Com E_UNEXPECTED (HResult=0x8000ffff) when calling a Com component from Java?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Allard_Siemelink
Posted On:   Tuesday, April 16, 2002 06:38 AM

I am using JNI to call a Com component. The Com component works fine except for one method which throws a _com_error with a HResult of 0x8000ffff (E_UNEXPECTED). When called from a C++ console application, this method works fine. My jni dll executes *exactly* the same code as the C++ program: both call a parameterless test() function that sets up com, creates the Com object and calls the methods. What could cause the method to fail when called from a Java? Details - jdk1.3.1_01 - In my Dll, I use the #import directive and the Smart Com wrappers - Apartment threaded or Multithreaded initialization makes no difference. Both work from c++    More>>

I am using JNI to call a Com component. The Com component works fine except for one method which throws a _com_error with a HResult of 0x8000ffff (E_UNEXPECTED).

When called from a C++ console application, this method works fine. My jni dll executes *exactly* the same code as the C++ program: both call a parameterless test() function
that sets up com, creates the Com object and calls the methods.


What could cause the method to fail when called from a Java?


Details

- jdk1.3.1_01

- In my Dll, I use the #import directive and the Smart Com wrappers

- Apartment threaded or Multithreaded initialization
makes no difference. Both work from c++ and fail from Java.

- Increasing the Java thread stack (-Xss1M) made no difference.



Allard Siemelink

   <<Less
About | Sitemap | Contact