JNI and COM pointers
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Nikhil_Khedkar
Posted On:   Tuesday, August 26, 2003 06:24 AM

Hi, I am working on developing a test application in java. I use java for UI only. I use JNI to communicate with a VC MFC DLL. I launch a IE browser instance in one JNI method, which works fine. I store the browser pointer (IWebBrowser2 *) as a C++ class instance variable. BTW, I start a thread on the native side (_beginthread) which in turn calls the method that launches the browser. If I set the navigation URL (Navigate2) in the method that launches the browser then it works fine. But if I add the same code of navigation in some other JNI method then it does not work. It fails with an error code of 0. Why is this happening? Is there any special care to be taken while working with COM pointers? I am using COM smart pointers. Thanks, Ni   More>>

Hi,
I am working on developing a test application in java. I use java for UI only. I use JNI to communicate with a VC MFC DLL. I launch a IE browser instance in one JNI method, which works fine. I store the browser pointer (IWebBrowser2 *) as a C++ class instance variable. BTW, I start a thread on the native side (_beginthread) which in turn calls the method that launches the browser. If I set the navigation URL (Navigate2) in the method that launches the browser then it works fine. But if I add the same code of navigation in some other JNI method then it does not work. It fails with an error code of 0. Why is this happening? Is there any special care to be taken while working with COM pointers? I am using COM smart pointers.

Thanks,
Nikhil

   <<Less
About | Sitemap | Contact