C call of a C# dll

M

Mark McIntyre

Not in theory, no. But how can you live without them in the real world?

How the implementation provides services is immaterial to any decent C
programme. It can use shared objects, dynamic linking or carrier pigeon.

And if you're talking about writing your own shared code, C again doesn't
care - as long as you can link with the function somehow.
your cells, but... BUT! ;-) If you're so strict in your understanding of the
"definition" of C then this whole c.l.c. business is just academic, right?

Only if you're the sort of person who thinks its ok to intermingle
database, UI and programme code in one function.
 
M

Mark McIntyre

20? Really? I thought the Great Renaming happened in 1987. Hm.

comp.lang.c was in existence before the Great Renaming. Its name changed,
but thats all.
I can't afford to lurk. I need the info _now_. Yesterday, in fact.

Then you're a complete idiot asking in usenet. This isn't instant
messaging, and if you want quick answers, you're barking up the wrong tree.
Go hire some consultants. :)
 
K

Keith Thompson

Eltee said:
20? Really? I thought the Great Renaming happened in 1987. Hm.

Yes, really.

1987 was 17 years ago, coming up on 18; that's close enough to be
called "about 20 years". Aside from that, comp.lang.c is the renamed
version of the old net.lang.c. I think net.lang.c was one of the
earliest newsgroups.
I can't afford to lurk. I need the info _now_. Yesterday, in fact.

I'm terribly sorry to hear that. If you need it yesterday, I'm afraid
you're too late. But you should seriously consider a different source
of information (possibly one costing money), since Usenet is not
designed to guarantee quick responses, and being upset with us for not
jumping to serve you is going to be counterproductive.

The urgency of your need for information does not imply an urgency on
our part to give it to you. We do this for fun; we're not customer
service.

But perhaps your need isn't quite as urgent as you seem to think it
is. If it were, you probably wouldn't have enough spare time on your
hands to come here and offer advice on how we should run our
newsgroup. (I use the term "our" loosely; comp.lang.c isn't anyone's
property, but those of us who have been regulars here for a long time
tend to feel some sense of responsibility for it.)

As for lurking, if your news server keeps articles for a long time you
can effectively lurk fairly quickly by skimming the saved articles.
Failing that, groups.google.com is a good substitute.
 
E

Eltee

Mark said:
Then you're a complete idiot asking in usenet. This isn't instant
messaging, and if you want quick answers, you're barking up the wrong tree.
Go hire some consultants. :)

No, no, don't misunderstand me. The answers came quickly enough. They just
weren't what I expected. Lurking, on the other hand, means what? A fortnight,
maybe a month of being passive? That's not what I'm prepared to invest in this
one lousy thing. Moreover, thanks to infobahn who kindly directed me to other
more appropriate places, I got that info very quickly.
 
E

Eltee

Keith said:
Yes, really.

1987 was 17 years ago, coming up on 18; that's close enough to be
called "about 20 years".

:))) That's a textbook example of something called rounding. And if it isn't,
it should be. I'm sure if you presented this to some banker, you'd get a job on
the spot.

> Aside from that, comp.lang.c is the renamed
version of the old net.lang.c.

Yeah, sure. Just like C++ is the renamed version of C.
> I think net.lang.c was one of the
earliest newsgroups.




I'm terribly sorry to hear that. If you need it yesterday, I'm afraid
you're too late. But you should seriously consider a different source
of information (possibly one costing money), since Usenet is not
designed to guarantee quick responses, and being upset with us for not
jumping to serve you is going to be counterproductive.

The urgency of your need for information does not imply an urgency on
our part to give it to you. We do this for fun; we're not customer
service.

But perhaps your need isn't quite as urgent as you seem to think it
is. If it were, you probably wouldn't have enough spare time on your
hands to come here and offer advice on how we should run our
newsgroup. (I use the term "our" loosely;

No kidding?!? ;-)
> comp.lang.c isn't anyone's
property, but those of us who have been regulars here for a long time
tend to feel some sense of responsibility for it.)

As for lurking, if your news server keeps articles for a long time you
can effectively lurk fairly quickly by skimming the saved articles.
Failing that, groups.google.com is a good substitute.

Not only the groups, the whole google. Don't think I haven't tried there first.
 
M

Mark McIntyre

The answers came quickly enough. They just weren't what I expected.

Thats unfortunate, but not exactly anyone here's fault.
Lurking, on the other hand, means what? A fortnight,
maybe a month of being passive? That's not what I'm prepared to invest in this
one lousy thing.

The thing is, when that attitude becomes apparent to others, they are
highly likely to take the same view - why should they bother to help you
when you can't be bothered to investigate for yourself?
Moreover, thanks to infobahn who kindly directed me to other
more appropriate places, I got that info very quickly.

Good.
 
M

Mark McIntyre

Yeah, sure. Just like C++ is the renamed version of C.

No, just like net.lang.c was renamed comp.lang.c during the great renaming.
Not only the groups, the whole google. Don't think I haven't tried there first.

Then you need to brush up your google skills - I got about 100 useful hits
in 0.24 seconds.
 
K

Keith Thompson

Eltee said:
Keith said:
Eltee said:
Mark McIntyre wrote: [...]
We were here first, by about 20 years.

20? Really? I thought the Great Renaming happened in 1987. Hm.
Yes, really.
1987 was 17 years ago, coming up on 18; that's close enough to be
called "about 20 years".

:))) That's a textbook example of something called rounding. And if
it isn't, it should be. I'm sure if you presented this to some banker,
you'd get a job on the spot.

What's your point? In banking, rounding $17 to $20 can get you fired
or arrested. In a casual conversation like this one, referring to a
17-year period as "about 20 years" (note that this is *explicitly* an
approximation) is perfectly appropriate, and whining about it makes
you look like a fool.
Yeah, sure. Just like C++ is the renamed version of C.

Not at all. comp.lang.c is, for all practical purposes, the same
newsgroup as the old net.lang.c; only the name changed. C++ is a new
and distinct language based on C. Again, what's your point? I'm
beginning to doubt that you have one.
 
E

Eltee

Mark said:
Thats unfortunate, but not exactly anyone here's fault.

Of course not. I never said anything like that.
The thing is, when that attitude becomes apparent to others, they are
highly likely to take the same view - why should they bother to help you
when you can't be bothered to investigate for yourself?

But I _am_ investigating. I'm not relying (only) on Usenet. It's just that I had
good experience with Usenet so far. Especially with "little" things,
directions mostly, the things that don't require knowing all the gory details of
a particular "technology".
 
E

Eltee

Mark said:
Then you need to brush up your google skills
Perhaps.

- I got about 100 useful hits
in 0.24 seconds.

That's what I'm talking about. What would it take for you to just post that info
here? Do you want me to beg for it?
 
E

Eltee

Keith said:
Eltee said:
Keith said:
Mark McIntyre wrote:
[...]
We were here first, by about 20 years.

20? Really? I thought the Great Renaming happened in 1987. Hm.

Yes, really.
1987 was 17 years ago, coming up on 18; that's close enough to be
called "about 20 years".

:))) That's a textbook example of something called rounding. And if
it isn't, it should be. I'm sure if you presented this to some banker,
you'd get a job on the spot.


What's your point? In banking, rounding $17 to $20 can get you fired
or arrested. In a casual conversation like this one, referring to a
17-year period as "about 20 years" (note that this is *explicitly* an
approximation) is perfectly appropriate, and whining about it makes
you look like a fool.

A quote from the clc welcome message:

Accuracy is valued very highly in this
newsgroup; therefore posts are frequently corrected, sometimes perhaps
too harshly, and often to the annoyance of new posters who consider the
correction trivial. Do not take it personally;

So, now, which is it? Accurate or casual? Looks like it's both: accurate when
you have to bash somebody else for their casualness and casual when you want to
bash them for their accuracy.
Not at all. comp.lang.c is, for all practical purposes, the same
newsgroup as the old net.lang.c; only the name changed. C++ is a new
and distinct language based on C. Again, what's your point? I'm
beginning to doubt that you have one.

My point is that for all practical purposes, C and C++ are strongly related (to
put it mildly). And for all practical purposes, loading a shared library is on
the menu of every decent programmer. So, for all practical purposes, that makes
it, de facto, a part of the language. I'm using "a part of" _casualy_, of course.
 
K

Keith Thompson

[Silly argument regarding "about 20 years" vs. "17 years" snipped]
A quote from the clc welcome message:

Accuracy is valued very highly in this
newsgroup; therefore posts are frequently corrected, sometimes perhaps
too harshly, and often to the annoyance of new posters who consider the
correction trivial. Do not take it personally;

So, now, which is it? Accurate or casual? Looks like it's both:
accurate when you have to bash somebody else for their casualness and
casual when you want to bash them for their accuracy.

There is nothing incorrect about referring to a period of 17 years as
"about 20 years". It was less precise than the kind of wording you
might expect in, say, a language standard, but it was as precise as it
needed to be in context. The point would have been equally valid if
the time period in question were 10 years or 30 years.

This is the last thing I'm going to say about it.
My point is that for all practical purposes, C and C++ are strongly
related (to put it mildly).

Yes, C and C++ are strongly related. but they are two distinct
languages. Questions about C++ are unquestionably off-topic here in
comp.lang.c; that's why comp.lang.c++ exists.
And for all practical purposes, loading a
shared library is on the menu of every decent programmer.

Perhaps. Personally, I rarely deal explicitly with shared libraries;
I leave that to the operating system.
So, for all
practical purposes, that makes it, de facto, a part of the
language. I'm using "a part of" _casualy_, of course.

No, it's not part of the language, it's a feature of the
implementation. We've been telling you for days that your question is
off-topic. Personally, I have no idea what the answer is. It's
likely you could get the information you're looking for in a
Windows-specific newsgroup, either one of the comp.os.ms-windows.*
groups or one of Microsoft's own microsoft.* groups. Have you tried?

Note that I'm not complaining about your original post. It's not
immediately obvious that a question about calling C# from C is
off-topic in comp.lang.c. But now you know that it is.
 
M

Mark McIntyre

And for all practical purposes, loading a shared library is on
the menu of every decent programmer.

No its not. I can't remember the last time I had to care about loading
shared libraries. Your OS should take care of that sort of nonsense for
you.
So, for all practical purposes, that makes
it, de facto, a part of the language.

No, because the langauage is defined by an international standard,.
I'm using "a part of" _casualy_, of course.

Be as casual as you like but don't expect anyone to help you much.
 
J

Jarno A Wuolijoki

A quote from the clc welcome message:

Accuracy is valued very highly in this
newsgroup; therefore posts are frequently corrected, sometimes perhaps
too harshly, and often to the annoyance of new posters who consider the
correction trivial. Do not take it personally;

So, now, which is it? Accurate or casual? Looks like it's both: accurate when
you have to bash somebody else for their casualness and casual when you want
to bash them for their accuracy.

Let me guess, you don't work much with floating point? ;)
 
C

CBFalconer

Richard Blewett said:
You can register the .NET class as a COM class (see regasm.exe)
and use CoCreateInstance and friends to call it - you can create
a typelib for your assembly using tlbexp.exe .... snip ...

Is it possible to
1. call a function from a dll made with .NET (C#)
2. from a program written in plain (as in: not .NET) C or C++?

This is way off-topic for c.l.c. Portable C code knows nothing
about classes, typelibs, dlls, .NET, etc. c.l.c deals only with
portable code that can execute on any system with a standards
compliant compiler system. F'ups set.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top