473,473 Members | 2,174 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Using low-level C libraries in other environments?

Cut
My apologies if this post is in the wrong forum.

I'd like to use an SDK written in low-level C and asm. I'm not sure
how this SDK is implemented; I'd have to buy it. So this question is
theoretical.

Is it possible to use a high-level IDE used for another language, such
as Java or C#, to use a C/ASM API?

Thanks for your time,
Cut

Dec 12 '06 #1
4 1140
In article <11**********************@80g2000cwy.googlegroups. com>,
Cut <cu*******@gmail.comwrote:
>My apologies if this post is in the wrong forum.
'Tis, but I'll try to give enough information for you to decide where
the right place to ask is.

>I'd like to use an SDK written in low-level C and asm. I'm not sure
how this SDK is implemented; I'd have to buy it. So this question is
theoretical.
If it's written in C and assembly, it most likely exports entry points
callable from C programs; if you can verify that, you don't have to
care how it's actually implemented - you can just act as if it were
implemented in C.

>Is it possible to use a high-level IDE used for another language, such
as Java or C#, to use a C/ASM API?
Probably, but the C language doesn't specify how (which is what makes
comp.lang.c the wrong place to ask).
Since C has fairly simple calling conventions and nearly universal
support, many (most?) higher-level languages make it possible to call into
a library that is, or acts like it is, implemented in C. Some languages
provide this as part of the language; for languages that don't, many
(most?) implementations of the language provide it as an extension.

Look for "native code interface" or "foreign function interface" in your
documentation, and if that doesn't tell you what you need to know try
a newsgroup that discusses the language you're using and/or the tools
you're using.
dave

--
Dave Vandervies dj******@csclub.uwaterloo.ca
We'll soon have you at the point where your method only works if the
computer is turned off.
--Kenneth Doyle in comp.theory
Dec 12 '06 #2
dj******@caffeine.csclub.uwaterloo.ca (Dave Vandervies) writes:
In article <11**********************@80g2000cwy.googlegroups. com>,
Cut <cu*******@gmail.comwrote:
[...]
>>Is it possible to use a high-level IDE used for another language, such
as Java or C#, to use a C/ASM API?

Probably, but the C language doesn't specify how (which is what makes
comp.lang.c the wrong place to ask).
Since C has fairly simple calling conventions and nearly universal
support, many (most?) higher-level languages make it possible to call into
a library that is, or acts like it is, implemented in C. Some languages
provide this as part of the language; for languages that don't, many
(most?) implementations of the language provide it as an extension.
<quibble>
C itself has no calling conventions. Most C *implementations* define
fairly simple calling conventions. And yes, it's common for other
languages to be able to call C functions, or functions in whatever
language that conform to the local C calling convention. How to use
such a feature is a question for a newsgroup that deals with the other
language, or with a particular implementation of it.
</quibble>

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Dec 12 '06 #3
In article <ln************@nuthaus.mib.org>,
Keith Thompson <ks***@mib.orgwrote:
>dj******@caffeine.csclub.uwaterloo.ca (Dave Vandervies) writes:
>In article <11**********************@80g2000cwy.googlegroups. com>,
Cut <cu*******@gmail.comwrote:
[...]
>>>Is it possible to use a high-level IDE used for another language, such
as Java or C#, to use a C/ASM API?

Probably, but the C language doesn't specify how (which is what makes
comp.lang.c the wrong place to ask).
Since C has fairly simple calling conventions and nearly universal
support, many (most?) higher-level languages make it possible to call into
a library that is, or acts like it is, implemented in C. Some languages
provide this as part of the language; for languages that don't, many
(most?) implementations of the language provide it as an extension.

<quibble>
C itself has no calling conventions. Most C *implementations* define
fairly simple calling conventions.
Hmmmyes. Something like "C imposes fairly simple constraints on an
implementation's calling conventions" would probably have been closer
to what I meant.

But then, I've been away for a while, and I don't have nearly enough
other ways of keeping in shape for the pedantic nitpickery^W^Wfanatical
devotion to accuracy that's expected around here.
dave

--
Dave Vandervies dj******@csclub.uwaterloo.ca
Personally, I think a few of you have too much time on your hands.
Obviously. usenet is filled with such people.
--Mark and Randy Howard in comp.lang.c
Dec 12 '06 #4
On 12 Dec 2006 10:31:06 -0800, "Cut" <cu*******@gmail.comwrote:
>My apologies if this post is in the wrong forum.

I'd like to use an SDK written in low-level C and asm. I'm not sure
how this SDK is implemented; I'd have to buy it. So this question is
theoretical.

Is it possible to use a high-level IDE used for another language, such
as Java or C#, to use a C/ASM API?
It is not only possible, it is a reality.

But the C Standard has nothing whatsoever to say about how other
languages such as Java or C#--let alone high-level IDE's--interface
with C. Consequently, your question is not really about C, but rather
about another language like Java that can "interface" with C. As such,
you would be better served asking your question in another, more
appropriate newsgroup.

Best regards
--
jay
Dec 13 '06 #5

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

Similar topics

0
by: burn_hall | last post by:
Hi, I have a problem and can't figure it out and need your help, please look at the following code and the output also a xml file snippet is down there too. Looking at the output I don't know why...
0
by: Andrew | last post by:
When will .NET have a low-pause-time garbage collector A low-pause-time garbage collector would greatly improve .NET's ability to serve as a platform for soft real-time systems. It doesn't have...
0
by: Bryan Parkoff | last post by:
I break one U_WORD variable into two U_BYTE variables. I prefer to manipulate two U_BYTE variables instead of one U_WORD variable using Carry. Please look at my example using U_WORD variable...
19
by: becte | last post by:
I need to use three bytes to store four 6-bit integers (4 * 6 = 3 * 8) like this 11111122|22223333|33444444 Suppose the input is, int c1, c2, c3, c4, range 0 .. 2^6 -1 and the output is int...
5
by: muscha | last post by:
Hi, I'm trying to decide whether I should use Guid.NewGuid() to generate an ID or using database sequence. Is Guid.NewGuid() will return a unique number? The MSDN said that the probability of...
5
by: harishashim | last post by:
I have gone through necessary step and have been able to use a .Net libraries (created using C#) in VB6. It run good untill I try to use certain function in the library that is using Int64 type as...
1
by: kingster | last post by:
Hi, I have a regular dataset and all i want to do is make a pivot table display in a browser with the datasource of the pivot table to be this dataset and then the end-user will be able to do...
6
by: Pascal Ehlert | last post by:
Hi group! I was trying to build a JS solution for related select lists (child lists gets populated depending on the value selected in parent list), which uses no Ajax and is still "usable" in an...
19
by: sarahh | last post by:
Hi, I need help in the following question . I have a cpu that knows to do the computations on 32 bits(unsigned integer( write a function that gets 2 64 bits numbers and return their sum. I start...
5
by: ryuchi311 | last post by:
In C++ using arrays. I need to create a C Program that will ask for five integers input from the user, then store these in an array. Then I need to find the lowest and highest integers inside that...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
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,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.