Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > C call of a C# dll

Reply
Thread Tools

C call of a C# dll

 
 
Eltee
Guest
Posts: n/a
 
      12-20-2004
Mark McIntyre wrote:
> On Sun, 19 Dec 2004 22:18:19 +0100, in comp.lang.c , Eltee
> <(E-Mail Removed)> wrote:
>
>
>>Martin Ambuhl wrote:
>>
>>>Eltee wrote:
>>>
>>>
>>>>Hi everybody,
>>>>
>>>>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++?
>>>
>>>
>>>Please do not post Microsoft-specific questions to comp.lang.c
>>>dll's, .NET, C# are all Gatesware and have nothing to do with the C
>>>programming language.

>>
>>But they have. They're written in C/C++.

>
>
> a) there's no such language as C/C++,


You're right there. Absolutely right. Then again, there's no such
language as C either. There's ANSI C, there's this C, there's that C.
And there's another C. BTW: which flavor is allowed to be discussed in
this NG?

Almost the same with C++. But I'm sure you knew that.

> you surely know that C and C++ are
> different (and incompatible) languages
>
> b) .NET and C# are NOT written in C or C++, they're written using
> Microsoft's extensions to the C++ language which are not part of C++ and
> certainly ain't part of C.


Right, silly me. BTW: are you guys always so helpful or are you just
trying to be elitistic?

>>More important, they have to interact with C and that's what I'm interested in.

>
>
> Who cares what you are interested in?


I thought that maybe the ones who are not interested would just ignore
my post. And the ones who reply would give me at least some directions
other than "go away". But heck, that's life. I'm not complaining.

> This is comp.lang.c, not
> comp.lang.eltees.interests.
>
>
>>Whether you like it or not.

>
>
> The point is, the topic here is the C language,


Yeah, right. Which C language, again?

> not how some
> vendor-specific extension of it, with its own newsgroup for crissake,


Which NG would that be, BTW? If I go into some M$ NG and mention MinGW
they'll do what you do: try to scare me off.

> interacts with some other random language.


Other than some other flavor of C you mean?
 
Reply With Quote
 
 
 
 
Eltee
Guest
Posts: n/a
 
      12-20-2004
CBFalconer wrote:
> Eltee wrote:
>
>>Martin Ambuhl wrote:
>>
>>>Eltee wrote:
>>>
>>>
>>>>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++?
>>>
>>>Please do not post Microsoft-specific questions to comp.lang.c
>>>dll's, .NET, C# are all Gatesware and have nothing to do with
>>>the C programming language.

>>
>>But they have. They're written in C/C++. More important, they
>>have to interact with C and that's what I'm interested in.
>>Whether you like it or not.

>
>
> No they don't. There are no such things as dll's in the C
> language,


Right, silly me. I should've said so's, right. How 'bout those?

> nor is their any mention of .net or C#.


Neither is there any mention of English. And yet, English comes in handy
in this ta-da! _C_ NG.

> However if you
> quote me chapter and verse from the ISO C standard


Oh, so that's the flavor. Makes me wonder, though, why this isn't
comp.lang.ISO.c.

> defining any of
> dll, .net, or C# I will retract.


Don't worry, you won't have to.

> Meanwhile you have peavishly and rudely continued to post off-topic
> material on c.l.c, when Martin had plainly set f'ups to confine any
> further discussion to an area where it might be on-topic.


Right, a great sin, a great sin. I'll have to mention it next sunday.
 
Reply With Quote
 
 
 
 
Eltee
Guest
Posts: n/a
 
      12-20-2004
infobahn wrote:
> Eltee wrote:
>
>> Martin Ambuhl wrote:
>>
>>> Eltee wrote:
>>>
>>>> Hi everybody,
>>>>
>>>> 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++?
>>>
>>>
>>>
>>>
>>> Please do not post Microsoft-specific questions to comp.lang.c
>>> dll's, .NET, C# are all Gatesware and have nothing to do with the C
>>> programming language.

>>
>>
>>
>> But they have. They're written in C/C++.

>
>
> I presume you mean that they are written in a mixture of C and C++.


Right. Finally some common sense.

> That in itself is not sufficient to make them relevant in this
> newsgroup, I'm afraid. (If it were, the newsgroup would become
> too general to be useful.)
>
> > More important, they have to

>
>> interact with C and that's what I'm interested in. Whether you like it
>> or not.

>
>
> Your question is more to do with the organisation of Windows DLLs
> than it is to do with the C programming language, so it may be a
> better use of your time to ask the folks in a Windows newsgroup,
> such as comp.os.ms-windows.programmer.win32. Whether you like it
> or not.


Ooh, I like it. Do you know you're the only person in here who gave me
some useful advice? I thank you from the bottom of my heart.
 
Reply With Quote
 
CBFalconer
Guest
Posts: n/a
 
      12-20-2004
Eltee wrote:
> infobahn wrote:
>> Eltee wrote:
>>> Martin Ambuhl wrote:
>>>> Eltee wrote:
>>>>>
>>>>> 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++?
>>>>
>>>> Please do not post Microsoft-specific questions to comp.lang.c
>>>> dll's, .NET, C# are all Gatesware and have nothing to do with the C
>>>> programming language.
>>>

.... snip ...
>>
>>> More important, they have to interact with C and that's what
>>> I'm interested in. Whether you like it or not.

>>
>> Your question is more to do with the organisation of Windows DLLs
>> than it is to do with the C programming language, so it may be a
>> better use of your time to ask the folks in a Windows newsgroup,
>> such as comp.os.ms-windows.programmer.win32. Whether you like it
>> or not.

>
> Ooh, I like it. Do you know you're the only person in here who gave me
> some useful advice? I thank you from the bottom of my heart.


If you make a large effort and exercize your miniscule brainlet,
you will see that Martin and then Infobahn gave you precise reasons
for not posting your query on c.l.c. However you insist on
shouldering your way in here with foolish and annoying comments.
This is a very poor reflection on the training you received from
your parents, or possibly indicates you are still too young to have
received such a benefit at all. If you happen to be "mentally
challenged" at least say so, and allow others to then give you the
benefit of the doubt.

--
Chuck F ((E-Mail Removed)) ((E-Mail Removed))
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!


 
Reply With Quote
 
Eltee
Guest
Posts: n/a
 
      12-20-2004
CBFalconer wrote:
> Eltee wrote:
>
>>infobahn wrote:
>>
>>>Eltee wrote:
>>>
>>>>Martin Ambuhl wrote:
>>>>
>>>>>Eltee wrote:
>>>>>
>>>>>>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++?
>>>>>
>>>>>Please do not post Microsoft-specific questions to comp.lang.c
>>>>>dll's, .NET, C# are all Gatesware and have nothing to do with the C
>>>>>programming language.
>>>>

> ... snip ...
>
>>>>More important, they have to interact with C and that's what
>>>>I'm interested in. Whether you like it or not.
>>>
>>>Your question is more to do with the organisation of Windows DLLs
>>>than it is to do with the C programming language, so it may be a
>>>better use of your time to ask the folks in a Windows newsgroup,
>>>such as comp.os.ms-windows.programmer.win32. Whether you like it
>>>or not.

>>
>>Ooh, I like it. Do you know you're the only person in here who gave me
>>some useful advice? I thank you from the bottom of my heart.

>
>
> If you make a large effort and exercize your miniscule brainlet,


Minuscule brainlet? Wow, that's pretty refreshing after all the nice
help I received in this NG.

> you will see that Martin and then Infobahn gave you precise reasons
> for not posting your query on c.l.c.


What precise reasons? Martin said that Gatesware had nothing to do with
C. Appart from that #include <windows.h> and (god forbid!) a dll
mentioned, the second code snippet I posted had nothin to do with Gates
and was, in fact, writen in C. If you guys are so geekishly elitistic
that it's beyond your standard to say "look, I think you'd find better
answers in comp.<whatever> than here", then you crowns-of-creation
should stick to the moderated groups (which do exist, btw) or even
closed mailing lists, and orgasm over "pure" C in private.

> However you insist on
> shouldering your way in here


Where _is_ here? Shoulder? I think this is a public NG. I don't need to
shoulder my way in.

> with foolish and annoying comments.
> This is a very poor reflection on the training you received from
> your parents,


Unlike you perhaps, I wasn't trained. I don't know about your hometown,
but where I live people generaly don't train their children. They train
their dogs.

> or possibly indicates you are still too young to have
> received such a benefit at all. If you happen to be "mentally
> challenged" at least say so, and allow others to then give you the
> benefit of the doubt.


All this hate just as a reaction to a (alleged) mispost? Sheesh! I
really must keep out.
 
Reply With Quote
 
infobahn
Guest
Posts: n/a
 
      12-20-2004
Eltee wrote:

> CBFalconer wrote:
>
>> If you happen to be "mentally
>> challenged" at least say so, and allow others to then give you the
>> benefit of the doubt.

>
>
> All this hate just as a reaction to a (alleged) mispost? Sheesh! I
> really must keep out.


That would be a shame. I don't wish to become embroiled in a
flamefest, but I hope you'll appreciate that C is such a
popular language that those who wish to discuss the language
itself, as opposed to the thousands of libraries and programs
written in (and for) it, find it necessary to guard the
topicality of this newsgroup very closely. If they didn't,
the newsgroup would quickly descend into an abyss of
platform-specific questions that mean little to the majority
of the readers of the group, at which point those C experts
that make this newsgroup most useful would in all likelihood
stop bothering to read it at all. Such an outcome would be
very regrettable, but inevitable. More or less the same
thing happened to comp.lang.c++ a few years ago, and it took
them a long time to recover.

There are, of course, lots of newsgroups dealing with questions
about C#, about Windows, about DLLs, and so on and so forth, so
it does make sense to direct such questions to those groups.

It is a little unfortunate that some longstanding comp.lang.c
regulars consider it necessary (or, perhaps, fun?) to lambast
those who innocently cross the topicality line, using pejorative
language that could easily be avoided. Nevertheless, it is
hardly surprising that their patience is tried from time
to time, given the number of times they have to explain the
topicality rules to newcomers.

This newsgroup is a wonderful learning resource for the C
language itself, as defined by ISO/IEC 9899 (the 1990 and
1999 flavours) or - for historical reasons - by K&R's
original book. I hope you will feel welcome here when you
have questions about the core language itself, and have the
good sense to seek platform-specific newsgroups when you
have platform-specific questions.

As I mentioned before, comp.os.ms-windows.programmer.win32
is an excellent "catch-all" Windows programming newsgroup,
whose experienced contributors should either be able to
answer your question or point you to an even more specialised
newsgroup.

Good luck in your search for an answer. Take care.
 
Reply With Quote
 
CBFalconer
Guest
Posts: n/a
 
      12-20-2004
infobahn wrote:
>

.... snip ...
>
> It is a little unfortunate that some longstanding comp.lang.c
> regulars consider it necessary (or, perhaps, fun?) to lambast
> those who innocently cross the topicality line, using pejorative
> language that could easily be avoided. Nevertheless, it is
> hardly surprising that their patience is tried from time
> to time, given the number of times they have to explain the
> topicality rules to newcomers.


The thing that was lambasted was the rude and ignorant insistance
on butting back in with OT drivel, especially as a response to
something that had follow-ups set precisely to avoid said drivel.
Who was it said "it does it only to annoy" in Alice?

--
Chuck F ((E-Mail Removed)) ((E-Mail Removed))
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!


 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      12-20-2004
Eltee <(E-Mail Removed)> writes:
[...]
> You're right there. Absolutely right. Then again, there's no such
> language as C either. There's ANSI C, there's this C, there's that
> C. And there's another C. BTW: which flavor is allowed to be discussed
> in this NG?


Yes, there is such a language as C. There are also a number of C-like
dialects. We discuss the former, not the latter.

We discuss C as defined by the 1990 and 1999 ISO standards, and
sometimes historical versions of C a defined by K&R1 and earlier
documents. We find that these restrictions don't create any lack of
things to talk about, as you can tell from the high volume of this
newsgroup.

[snip]
> Right, silly me. BTW: are you guys always so helpful or are you just
> trying to be elitistic?


If someone has a question about standard C, we tend to be very
helpful. For questions about anything else, the best help we can give
is to advise the questioner to ask it somewhere else. We're not
trying to be elitist; we're trying to maintain the focus of this
newsgroup, and we're acknowledging the limits of our expertise.

Ignoring off-topic posts doesn't work. First, it would require
unanimous agreement to ignore them, which is impractical. Second,
they would quickly drown the newsgroup; this has happened in other
groups, and we don't want it to happen here.

--
Keith Thompson (The_Other_Keith) http://www.velocityreviews.com/forums/(E-Mail Removed) <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.
 
Reply With Quote
 
Mark McIntyre
Guest
Posts: n/a
 
      12-20-2004
On Mon, 20 Dec 2004 09:26:52 +0100, in comp.lang.c , Eltee
<(E-Mail Removed)> wrote:

>You're right there. Absolutely right. Then again, there's no such
>language as C either. There's ANSI C, there's this C, there's that C.
>And there's another C.


There's exacly one computer langauge called C. Its defined by the ISO
standard.

>BTW: which flavor is allowed to be discussed in this NG?


Guess.

>> b) .NET and C# are NOT written in C or C++, they're written using
>> Microsoft's extensions to the C++ language which are not part of C++ and
>> certainly ain't part of C.

>
>Right, silly me. BTW: are you guys always so helpful or are you just
>trying to be elitistic?


We're always so helpful. It only looks elitist if you're too stupid to
realise you're asking about buying socks in a greengrocers.

>I thought that maybe the ones who are not interested would just ignore
>my post. And the ones who reply would give me at least some directions
>other than "go away". But heck, that's life. I'm not complaining.


Round here, we agressively defend teh topic of the group, because otherwise
it gets filled with people asking offtopic quesstions, and idiots answering
them with incorrect, misleading or plain *******s answers.

> > not how some
>> vendor-specific extension of it, with its own newsgroup for crissake,

>
>Which NG would that be, BTW?


I have no clue. Get a newsreader with search facilities.

>> interacts with some other random language.

>
>Other than some other flavor of C you mean?


C has no flavours. And there's a U in flavour.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
 
Reply With Quote
 
Mark McIntyre
Guest
Posts: n/a
 
      12-20-2004
On Mon, 20 Dec 2004 14:23:12 +0100, in comp.lang.c , Eltee
<(E-Mail Removed)> wrote:

>CBFalconer wrote:
>> Eltee wrote:
>>
>> you will see that Martin and then Infobahn gave you precise reasons
>> for not posting your query on c.l.c.

>
>What precise reasons? Martin said that Gatesware had nothing to do with
>C.


Yes. And he's right.

>Appart from that #include <windows.h> and (god forbid!) a dll
>mentioned, the second code snippet I posted had nothin to do with Gates


windows.h is the Windows platform header. If thats not Windows specific,
nothing is.

>and was, in fact, writen in C. If you guys are so geekishly elitistic
>that it's beyond your standard to say "look, I think you'd find better
>answers in comp.<whatever> than here",


What better answer is there, than to point you at the experts? We're not
windows experts, why ask us?

>then you crowns-of-creation
>should stick to the moderated groups (which do exist, btw) or even
>closed mailing lists, and orgasm over "pure" C in private.


CLC was here first. We like this group like it is. If you want to discuss
someething else, go elsewhere.


>Unlike you perhaps, I wasn't trained. I don't know about your hometown,
>but where I live people generaly don't train their children.


This explains /a lot/ about some of the posters here. Of course people
train their kids - you train them to say please and thankyou, not to hit
other kids, not to sh*t on granny's carpet, not to steal ferraris.

>All this hate just as a reaction to a (alleged) mispost? Sheesh! I
>really must keep out.


No don't do that. But do post topical posts.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Second long argument to a JNI call on a Win32 DLL contains zero when it reaches the DLL pcarr01 Java 3 02-17-2005 09:30 AM
How to determine if a DLL is a COM DLL or .NET DLL Anushi ASP .Net 5 10-28-2004 01:59 PM
Why does Ruby use both tcl83.dll and tk83.dll (instead of just tk83.dll)? H. Simpson Ruby 4 08-03-2004 04:45 PM
mprapi.dll --> samlib.dll --> ntdll.dll issue. Some1 Computer Support 4 04-05-2004 02:02 AM
msvcrt.dll, msvcirt.dll, msvcrt20.dll and msvcrt40.dll, explanation please! Snoopy NZ Computing 16 08-25-2003 12:34 PM



Advertisments