Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / July 2005

Tip: Looking for answers? Try searching our database.

can i use JNI from a managed c++ __gc class ?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
yaron - 28 Jul 2005 14:29 GMT
Thanks.
William DePalo [MVP VC++] - 28 Jul 2005 14:40 GMT
> Thanks.

Not directly.

But as JNI is the native interface to Java, and as managed C++ code can call
native code in two ways (using it just works or Platform/Invoke described
here

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmxspec/html/v
cmg_part2start.asp
)

you could make use of JNI DLLs in a .Net application.

Regards,
Will
Carl Daniel [VC++ MVP] - 28 Jul 2005 14:41 GMT
> Thanks.

I don't see why not.  JNI (or the Java Invocation API) is just a native API.
You should be able to call into the JVM from C++ code compiled with /clr
just as you can call into any other native code.

Likewise, you should be able to implement JNI-callable functions in managed
code by giving them a C++ wrapper that's exported with the proper naming
convention.

-cd

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.