Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

casting a com object reference into a java object

 
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
Through a jni call i am returned a handle to HINTERNET class of MFC.
Now i am supposed to cast it into a valid java connection and then use it for further communication on internet. The problem that i am facing is that i don't know of any methods to cast MFC object into java objects.
Please help, since it is very urgent...
thanks and regards
raghav..
 
Raghvendra Sharma
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In further explaination to the above case,
I have an applet which needs to connect to a servlet residing on the application server which is behind a proxy server.
Now the problem is that the applet's authentication mechanism is not able to accomplish that on its own. What we plan to do is to call a native method written in VC++ with some parameters.
The method then authenticates using given credentials and then returns the authenticated stream back to the java calling method.
The problem that i am facing is that the handle returned returned by the native method (VC++) is a reference to HINTERNET interface which then is needed to be cast into connection of java so that i can further use it.

What help I need from the comunity is the ways and means for casting/converting that HINTERNET handle to java connection.
How do i go about it ? Please help..
regards
raghav..
 
Won't you please? Please won't you be my neighbor? - Fred Rogers. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic