Hi all, can i call a c dll in another c program like what vb does
without knowing .h file? thanks 16 2176
pc_newbie <ay@computermail.net> wrote: Hi all, can i call a c dll in another c program like what vb does without knowing .h file? thanks
Sorry, this is off-topic in comp.lang.c because it cannot be done
in a portable manner with standard C.
Please read the welcome message http://www.angelfire.com/ms3/bchambl...me_to_clc.html
and the faq-list for this ng http://www.eskimo.com/~scs/C-faq/top.html
before posting. Thank you very much.
Regards
Irrwahn
--
My other computer is a abacus.
"pc_newbie" <ay@computermail.net> wrote in message news:3f********@news.iprimus.com.au... Hi all, can i call a c dll in another c program like what vb does without knowing .h file? thanks
Yes, you can.
You can write your own header file just for the functions you are going to
use. But you must know exactly what the prototypes of those functions are. If you
got the documentation, you can eassily figure out the prototypes, even without
a header file. Sorry, this is off-topic in comp.lang.c because it cannot be done in a portable manner with standard C.
Please do not confuse comp.std.c with comp.lang.c.
The question is a legitimate question that many people have asked. And it concerns
the C language since calling conventions from other languages are common since
the very start of C.
C uses binary interfaces with other languages since a long time, FORTRAN being the
first one.
Today is VB, what is conceptually the same. Fortran and VB are both foreign
language systems.
jacob
In article <bk**********@news-reader1.wanadoo.fr>,
jacob navia <ja*********@jacob.remcomp.fr> wrote: Sorry, this is off-topic in comp.lang.c because it cannot be done in a portable manner with standard C. Please do not confuse comp.std.c with comp.lang.c.
You are confused.
We write about the C standard document in comp.std.c.
We write about the C standard language in comp.lang.c.
We write about platform specific issues in some other newsgroup.
Today is VB, what is conceptually the same. Fortran and VB are both foreign language systems.
FORTRAN and VB are off topic here.
--
Göran Larsson http://www.mitt-eget.com/
jacob navia wrote: Sorry, this is off-topic in comp.lang.c because it cannot be done in a portable manner with standard C.
Please do not confuse comp.std.c with comp.lang.c.
Since the statement you responded to (without attribution) was exactly
right in comp.lang.c and was, if not wrong, then completely strange for
comp.std.c, it is clearly you who is confused.
In comp.std.c, the topic is the standard, and so programming questions are
off-topic, even if the tasks can be done in standard C.
In comp.lang.c, the topic is programming in C, a language that is defined
by the standard. That language does not specify anything about linkage to
other languages. That is an *implementation* issue and is asked in an
implementation-specific newsgroup. Next we know, you'll be posting things
about non-types like 'qfloat' and garbage collection as part of the language.
Perhaps you should just hang up your keyboard until you learn what the
newsgroup is about, and that posting otherwise is rude. You might also
learn not to "correct" people who are right with your completely offbase
errors. The question is a legitimate question that many people have asked. And it concerns the C language since calling conventions from other languages are common since the very start of C.
Big deal. In *every* case it is a process involving negotiations between
some *implementation* of C, some *implementation* of that other language,
and some *implementation* of a linker. The possible combinations are
enough to make any answer given here not only off-topic (and it would be,
no matter what you've been smoking to think otherwise), but *wrong*.
--
Martin Ambuhl
jacob navia wrote: "pc_newbie" <ay@computermail.net> wrote in message news:3f********@news.iprimus.com.au...
Hi all, can i call a c dll in another c program like what vb does without knowing .h file? thanks
Yes, you can. You can write your own header file just for the functions you are going to use. But you must know exactly what the prototypes of those functions are. If you got the documentation, you can eassily figure out the prototypes, even without a header file.
Hi all guys, thanks you very much!
"Goran Larsson" <ho*@invalid.invalid> wrote in message news:HL********@approve.se... FORTRAN and VB are off topic here.
Yes. But not the C interface to those systems. VB questions would be off topic,
not C interfacing with those systems. -- Göran Larsson http://www.mitt-eget.com/
In article <bk**********@news-reader5.wanadoo.fr>,
jacob navia <ja*********@jacob.remcomp.fr> wrote: Yes. But not the C interface to those systems. VB questions would be off topic, not C interfacing with those systems.
Even that is off topic here. There is nothing in the C standard about
interfacing to FORTRAN or VB, it is all implementation specific.
--
Göran Larsson http://www.mitt-eget.com/
"jacob navia" <ja*********@jacob.remcomp.fr> wrote: "Goran Larsson" <ho*@invalid.invalid> wrote in message news:HL********@approve.se... FORTRAN and VB are off topic here.
Yes. But not the C interface to those systems. VB questions would be off topic, not C interfacing with those systems.
Ah, so? Please point out where in the C standard(s) the terms 'dll',
'VB' or 'interface' are mentioned; C&V please.
Irrwahn
--
My other computer is a abacus.
----- Original Message -----
From: "Irrwahn Grausewitz" <ir*****************@freenet.de>
Newsgroups: comp.lang.c
Sent: Sunday, September 21, 2003 12:22 PM
Subject: Re: dll ? "jacob navia" <ja*********@jacob.remcomp.fr> wrote: "Goran Larsson" <ho*@invalid.invalid> wrote in message news:HL********@approve.se... FORTRAN and VB are off topic here.
Yes. But not the C interface to those systems. VB questions would be off topic, not C interfacing with those systems.
Ah, so? Please point out where in the C standard(s) the terms 'dll', 'VB' or 'interface' are mentioned; C&V please.
The question of the OP is covered in 6.7.5.3: prototypes.
Prototypes are used to specify function interfaces, that can be very well written in
a foreign language.
The question concerned how to figure out the prototypes for functions written
in VB but this is equally useful for any foreign functions, in FORTRAN, VB,
Pascal or whatever.
The standard way of doing this is providing a C bindings header. I answered that
in the absence of this header, this can be done by using the documentation of
the package, and figuring out the C interface of the functions you want to use.
It is a widely used practice to give prototypes (header files) for functions written
in assembly language. All system header files like TCPIP headers, GUI headers,
etc, use this facility of the C language. There is nothing off topic here, and I would
contradict your assertion that "this can't be done in portable C". Of course it can
be done, and it is done massively in all operating systems I know of.
jacob
"jacob navia" <ja*********@jacob.remcomp.fr> wrote: From: "Irrwahn Grausewitz" <ir*****************@freenet.de> Newsgroups: comp.lang.c Sent: Sunday, September 21, 2003 12:22 PM Subject: Re: dll ?
Why did you include the whole header? "jacob navia" <ja*********@jacob.remcomp.fr> wrote: > >"Goran Larsson" <ho*@invalid.invalid> wrote in message news:HL********@approve.se... >> FORTRAN and VB are off topic here. > >Yes. But not the C interface to those systems. VB questions would be off topic, >not C interfacing with those systems. Ah, so? Please point out where in the C standard(s) the terms 'dll', 'VB' or 'interface' are mentioned; C&V please.
The question of the OP is covered in 6.7.5.3: prototypes.
Prototypes are used to specify function interfaces, that can be very well written in a foreign language.
Maybe. But foreign languages are OT in c.l.c. The question concerned how to figure out the prototypes for functions written in VB but this is equally useful for any foreign functions, in FORTRAN, VB, Pascal or whatever.
And all of this is OT too. Write about FORTRAN in a FORTRAN ng, about
VB in VB ng, write about Pascal ina Pascal ng. That's what they are
made for. The standard way of doing this is providing a C bindings header. I answered that in the absence of this header, this can be done by using the documentation of the package, and figuring out the C interface of the functions you want to use.
See above.
It is a widely used practice to give prototypes (header files) for functions written in assembly language. All system header files like TCPIP headers, GUI headers, etc, use this facility of the C language. There is nothing off topic here, and I would contradict your assertion that "this can't be done in portable C". Of course it can be done, and it is done massively in all operating systems I know of.
System header files are, will be and have ever been non-standard and
therefore OT in c.l.c, just like TCP/IP, GUIs, GC, etc.
If you reread you will notice that my assertion was: "it cannot be done
in a portable manner with standard C", and it still holds. Please stop
polluting c.l.c with OT OS/implementation-specific trash, you are
wasting my limited bandwidth.
Thank you.
Irrwahn
--
My other computer is a abacus.
On Sun, 21 Sep 2003 00:21:54 +0200, in comp.lang.c , "jacob navia"
<ja*********@jacob.remcomp.fr> wrote: Sorry, this is off-topic in comp.lang.c because it cannot be done in a portable manner with standard C. Please do not confuse comp.std.c with comp.lang.c.
You're confused yourself. C.S.C is for discussion about the standard
itself, ie the document. C.L.C is for discussion of how to use the
language defined in the Standard.
The question is a legitimate question that many people have asked.
Its a legitimate question. but offtopic here.
And it concerns the C language since calling conventions from other languages are common since the very start of C.
And since the very start of Standardised C, they've been outside the
Standard.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
pc_newbie <ay@computermail.net> scribbled the following: Hi all, can i call a c dll in another c program like what vb does without knowing .h file? thanks
You will have to know and provide the function prototypes yourself.
--
/-- Joona Palaste (pa*****@cc.helsinki.fi) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"Stronger, no. More seductive, cunning, crunchier the Dark Side is."
- Mika P. Nieminen
pc_newbie wrote: Hi all, can i call a c dll in another c program like what vb does without knowing .h file? thanks
i am asking a question in c, but want to know if c could do the way like
what what what.... i am not asking other programming lang. here. sorry
for confusing you.
pc_newbie <ay@computermail.net> wrote: pc_newbie wrote:
Hi all, can i call a c dll in another c program like what vb does without knowing .h file? thanks i am asking a question in c, but want to know if c could do the way like what what what.... i am not asking other programming lang. here.
You asked a question that is related to C, but is not addressed by the
standardized C language, that's why there are places different from
c.l.c where you probably get better answers.
sorry for confusing you.
No problem.
Irrwahn
--
My other computer is a abacus.
pc_newbie wrote: pc_newbie wrote:
Hi all, can i call a c dll in another c program like what vb does without knowing .h file? thanks i am asking a question in c, but want to know if c could do the way like what what what.... i am not asking other programming lang. here. sorry for confusing you.
We are not confused. However, as others have explained, such
things not described in the standard, or implementable using only
things within the standard, are off-topic here.
For a language with built-in abilities to communicate with other
languages, etc., see Ada.
--
Replies should be to the newsgroup
Chuck Falconer, on vacation. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: William C. White |
last post by:
Does anyone know of a way to use PHP /w Authorize.net AIM without using
cURL? Our website is hosted on a shared drive and the webhost company
doesn't installed additional software (such as cURL)...
|
by: Albert Ahtenberg |
last post by:
Hello,
I don't know if it is only me but I was sure that header("Location:url")
redirects the browser instantly to URL, or at least stops the execution of
the code. But appearantely it continues...
|
by: James |
last post by:
Hi,
I have a form with 2 fields.
'A'
'B'
The user completes one of the fields and the form is submitted.
On the results page I want to run a query, but this will change
subject to which...
|
by: Ollivier Robert |
last post by:
Hello,
I'm trying to link PHP with Oracle 9.2.0/OCI8 with gcc 3.2.3 on a Solaris9
system. The link succeeds but everytime I try to run php, I get a SEGV from
inside the libcnltsh.so library.
...
|
by: Richard Galli |
last post by:
I want viewers to compare state laws on a single subject.
Imagine a three-column table with a drop-down box on the top. A viewer
selects a state from the list, and that state's text fills the...
|
by: Albert Ahtenberg |
last post by:
Hello,
I have two questions.
1. When the user presses the back button and returns to a form he filled
the form is reseted. How do I leave there the values he inserted?
2. When the...
|
by: inderjit S Gabrie |
last post by:
Hi all
Here is the scenerio ...is it possibly to do this...
i am getting valid course dates output on to a web which i have designed
....all is okay so far , look at the following web url
...
|
by: Jack |
last post by:
Hi All,
What is the PHP equivilent of Oracle bind variables in a SQL statement, e.g.
select x from y where z=:parameter
Which in asp/jsp would be followed by some statements to bind a value...
|
by: Sandwick |
last post by:
I am trying to change the size of a drawing so they are all 3x3.
the script below is what i was trying to use to cut it in half ... I
get errors.
I can display the normal picture but not the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
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...
|
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,...
|
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,...
| |