473,756 Members | 7,560 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

writing c++ programs/API for .net and java

I wanted to write a C++ API that can be used in both .NET and Java. Is
this possible? Where would I start? My .NET and Java programming
skills are good and my C++ is okay (lost in memory). I know that Java
can make calls to native code using JNI. .NET also provides utils and
wrappers for native code to be used (at least if you use ATL).

However, what factors do I need to consider (i.e. GCC vs Microsoft C+
+) when writing my C++ code so that .NET and Java can use the code? My
ultimate goal is to have .NET and Java use the C++ API, and allow the
use of the C++ API on Linux and Microsoft platform.

I do not want to go through webservices to interoperate .NET and Java
for a variety of reasons.

Apr 11 '07 #1
1 1507
jakester wrote:
I wanted to write a C++ API that can be used in both .NET and Java. Is
this possible? Where would I start? My .NET and Java programming
skills are good and my C++ is okay (lost in memory). I know that Java
can make calls to native code using JNI. .NET also provides utils and
wrappers for native code to be used (at least if you use ATL).

However, what factors do I need to consider (i.e. GCC vs Microsoft C+
+) when writing my C++ code so that .NET and Java can use the code? My
ultimate goal is to have .NET and Java use the C++ API, and allow the
use of the C++ API on Linux and Microsoft platform.

I do not want to go through webservices to interoperate .NET and Java
for a variety of reasons.
Write a C++ API that can be used in C++. Then write .NET and JNI
wrappers around them. You get 3.

Consider asking in a Java newsgroup about JNI and in .NET newsgroup
about their requirements. Neither technology is defined in the C++
language Standard, and comp.lang.c++ is not the right place to talk
about those IMO.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Apr 11 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1783
by: mark1822 | last post by:
Hi, I am trying to figure out if I should learn C and C++ to write CGI programs, or if I should just use PHP for my web site. I want to write a high traffic website that would call executibles a lot dealing with text. Are CGI programs written in C faster then PHP script programs?
4
5473
by: Daniel Polansky | last post by:
Is there a way to open file for writing so that the opening fails if the file already exist? This needs to be atomic operation so that it is possible to use the file as a semaphore. As a result, the following coding does not do: if (!file.exist()) { // open the file for writing ... A similar function definitely exists for accessing files in
4
3966
by: vishnu mahendra | last post by:
Hello to all, I am newbie to java. Is java applets are interpreted programs or just compiled programs that runs in java supported web browsers. I know for sure java applications are interpreted applications.because javac is a compiler that converts source code into Bytecodes. java is a interpreter(JVM) that executes Bytecodes.
8
2416
by: michaaal | last post by:
When writing an ASP app, it has been my experience that usually I write code that is compatible with IE6 but not previous versions of Internet Explorer. Does anyone have any practical advice for writing an ASP app that you want to be compatible with IE5 and IE55?
0
1749
by: Gazelle | last post by:
I have a dilemma, that I am hopping I can find some help with. He is the back story so everyone sort of understands what it is that I am trying to accomplish. My problem: I have multiple users, each user has 2 or more CPU’s, using 3 or more monitors. 1 CPU system is running my web application. (Slick, high performance, and wonderful)
0
1124
by: s99999999s2003 | last post by:
hi in my environment, besides shell scripts written for sys admin tasks, there are shell scripts that call java programs which in turn will do various processing like connecting to databases and doing manipulation of data. My programmers all know only Java and so this is how the java programs come about. Also, some scripts were written in Perl by some admins who left, and successors have difficulty grasping perl syntax and how it works....
5
5086
by: UJ | last post by:
I have a system that has five programs that all communicate with each other via Message Queues. Works well. One program is a watchdog that will make sure the others are up and going. Currently I have it store info it gets from when the programs check in into a DataSet (XML file). Problem is, that file now has to be used by other programs to find out version information (the file is ALWAYS less that 1K.) The record itself is only five fields...
22
2719
by: JoeC | last post by:
I am working on another game project and it is comming along. It is an improvment over a previous version I wrote. I am trying to write better programs and often wonder how to get better at programming. I tend to learn what is useful and gets the job done. I am always curious if there is some techique I don't know. I read books and study as well as write programs. My goal is to some day be able to get a job programming. I have a...
0
9456
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9275
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8713
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7248
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6534
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3806
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3359
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2666
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.