473,385 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

C call of a C# dll

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++?

To be more specific, this is what I have.

1.
C# file Class.cs:

using System; //and some other packages

namespace myns
{
public class Class
{
public Class()
{
}

public static byte[] getByteArray(
string name,
int index,
string format,
ref int n
) {
//Code returning some byte array.
}
}
}

Compiling it, I get myns.dll.

2.
C file mycaller.c:

#include <windows.h>
#include <stdio.h>
#include "mycaller.h"

typedef byte* (*FunctionPointer)(char*, int, char*, int*);

#ifdef __cplusplus
extern "C" {
#endif

byte* myfunc() {

//load the library
HINSTANCE m_libraryHandle = LoadLibrary("myns.dll");
if(m_libraryHandle != NULL) {
printf("Library loaded\n");
}
else {
printf("Library not loaded\n");
return NULL;
}

byte* result = NULL;

//get the function pointer
FunctionPointer functionptr =
(FunctionPointer)GetProcAddress(m_libraryHandle,
"getByteArray");

if(functionptr != NULL) {
printf("Function pointer is OK\n");

int n = -1;
//call the function from the loaded library
result = (*functionptr)("fubar1", 0, "fubar2", &n);

//some code modifying the result
}
else {
printf("Function pointer is NULL\n");
}

//free the library
FreeLibrary(m_libraryHandle);
printf("Library freed\n");

return result;
};

#ifdef __cplusplus
}
#endif

Now, the problem. Library gets loaded but the function pointer is
allways NULL.

1. Should the method call getByteArray() in Class.cs be "externalized"
somehow
in order for the call to be successful? If so, how do I "externalize" it?

2. Is the name of the function in GetProcAddress() wrong? Should I put the
namespace (myns) and class name (Class) in front of the method name? If
so, how
(I mean what delimiters do I use)?

3. Something else?

All help will be greatly appreciated. Thanks.
Nov 14 '05 #1
77 3950
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

Regards

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

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++?

Nov 14 '05 #2
Richard Blewett [DevelopMentor] wrote:
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


I'm fairly new to .NET and C#. Could you be more specific, please?
Nov 14 '05 #3
Richard Blewett [DevelopMentor] wrote:
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


Please do not post answers to Microsoft-specific questions to comp.lang.c
dll's, .NET, C# are all Gatesware and have nothing to do with the C
programming language.
Nov 14 '05 #4
Eltee wrote:
Richard Blewett [DevelopMentor] wrote:
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


I'm fairly new to .NET and C#. Could you be more specific, please?


Not in comp.lang.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.
Nov 14 '05 #5
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.
Nov 14 '05 #6
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++. More important, they have to
interact with C and that's what I'm interested in. Whether you like it
or not.
Nov 14 '05 #7
On Sun, 19 Dec 2004 22:18:19 +0100, in comp.lang.c , Eltee
<el***@hotmail.com> 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 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.
More important, they have to interact with C and that's what I'm interested in.
Who cares what you are interested in? 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, not how some
vendor-specific extension of it, with its own newsgroup for crissake,
interacts with some other random language.


--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>
Nov 14 '05 #8
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, nor is their any mention of .net or C#. However if you
quote me chapter and verse from the ISO C standard defining any of
dll, .net, or C# I will retract.

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.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #9
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++.
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. :-)

Nov 14 '05 #10
Mark McIntyre wrote:
On Sun, 19 Dec 2004 22:18:19 +0100, in comp.lang.c , Eltee
<el***@hotmail.com> 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?
Nov 14 '05 #11
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.
Nov 14 '05 #12
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.
Nov 14 '05 #13
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 (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #14
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.
Nov 14 '05 #15
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.
Nov 14 '05 #16
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 (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #17
Eltee <el***@hotmail.com> 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) 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.
Nov 14 '05 #18
On Mon, 20 Dec 2004 09:26:52 +0100, in comp.lang.c , Eltee
<el***@hotmail.com> 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 bollocks 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>
Nov 14 '05 #19
On Mon, 20 Dec 2004 14:23:12 +0100, in comp.lang.c , Eltee
<el***@hotmail.com> 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>
Nov 14 '05 #20
Keith Thompson wrote:
Eltee <el***@hotmail.com> 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.


Then, to avoid confusion, you should rename your (sic!) NG
comp.lang.pure.c, comp.lang.1990iso.c, comp.lang.1999iso.c or
comp.lang.kr.c. ;-) Otherwise guys like me will bother you with OT
questions all the time. Seriously, would you "reject" some C-related
quesion only because the code snippet illustrating the problem used some
"third party" lib?
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.


That's all I need. But, as you can see, I got something completely
different from Martin. Thrice. Only infobahn (thanks again!) gave me
some decent advice.
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.

Nov 14 '05 #21
Mark McIntyre wrote:
On Mon, 20 Dec 2004 09:26:52 +0100, in comp.lang.c , Eltee
<el***@hotmail.com> 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.


The one defined by the ISO standard?
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.


Could be. Could be. Then again such problems can easily be solved. All
it takes is a little smile from the greengrocery attendant and a
direction to a socks shop instead of a (c)rude "we don't sell socks and
we especially don't sell Gatessocks!".
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 bollocks 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.


You're absolutely right. There's a U in colour, too. If you ask the
right people. Others will, of course, deny it. ;-) Me, sometimes I use
it and sometimes I don't. Depends on the mood I'm in and on the
spell-link chequer I use (if I use one at all). ;-)
Nov 14 '05 #22
Eltee <el***@hotmail.com> writes:
Keith Thompson wrote:
Eltee <el***@hotmail.com> 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.


Then, to avoid confusion, you should rename your (sic!) NG
comp.lang.pure.c, comp.lang.1990iso.c, comp.lang.1999iso.c or
comp.lang.kr.c. ;-) Otherwise guys like me will bother you with OT
questions all the time.


Guys like you do bother us with OT questions all the time. Most of
them have sense enough to pay attention when we tell them their
questions are off-topic.

The scope of the newsgroup isn't entirely obvious from its name. But
now you know. What exactly are you hoping to accomplish by belaboring
the point?
Seriously, would you "reject" some C-related quesion only because
the code snippet illustrating the problem used some "third party"
lib?


It depends on the circumstances.

--
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.
Nov 14 '05 #23
On Tue, 21 Dec 2004 11:10:09 +0100, Eltee wrote:
Keith Thompson wrote:
Eltee <el***@hotmail.com> 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.


Then, to avoid confusion, you should rename your (sic!) NG
comp.lang.pure.c, comp.lang.1990iso.c, comp.lang.1999iso.c or
comp.lang.kr.c. ;-) Otherwise guys like me will bother you with OT
questions all the time.


Believe me that will happen anyway. :-)

Besides you now know what the C language is, so this isn't all bad. This
newsgroup IS about the C language so comp.lang.c is a good name for it and
akes it broadly consistent with other language newsgroups.
Seriously, would you "reject" some C-related
quesion only because the code snippet illustrating the problem used some
"third party" lib?


It depends on whether the problem is about issues with C or issues with
the 3rd party lib. For example there is a problem with the code:

execl("name", NULL);

To see that there's a problem you have to know that this is the POSIX
function (C doesn't define it), and that the POSIX execl() takes a
variable argument list of character pointers (the last of which must be a
null pointer). Once you know that the problem itself is entirely a C one.

Not everybody replying may spot that however, nor should they be expected
to.

Lawrence
Nov 14 '05 #24
Eltee wrote:
Mark McIntyre wrote:

.... snip ...

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.


Could be. Could be. Then again such problems can easily be
solved. All it takes is a little smile from the greengrocery
attendant and a direction to a socks shop instead of a (c)rude
"we don't sell socks and we especially don't sell Gatessocks!".


Meanwhile, by ignoring perfectly sound, if terse, advice you have
accomplished getting yourself listed in various PLONK lists, so
that when and if you ever really need advice in this field you just
won't be heard. You'll go far.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #25
"Lawrence Kirby" <lk****@netactive.co.uk> wrote in message
news:pa***************************@netactive.co.uk ...
On Tue, 21 Dec 2004 11:10:09 +0100, Eltee wrote: It depends on whether the problem is about issues with C or issues with
the 3rd party lib. For example there is a problem with the code:

execl("name", NULL);

To see that there's a problem you have to know that this is the POSIX
function (C doesn't define it), and that the POSIX execl() takes a
variable argument list of character pointers (the last of which must be a
null pointer). Once you know that the problem itself is entirely a C one.

Not everybody replying may spot that however, nor should they be expected
to.


If we provide the propotype for the execl function, a discussion on what
problems lie in the example is very much on topic:

from the Linux man page:

int execl( const char *path, const char *arg, ...);

In the example given, there really are 2 kinds of problems, one related to the
semantics of the execl() library function and system call, that specifies that
the first argument to execl is the pathname of a file to be executed, the second
and subsequent being a list of the arguments passed to that command as argv[0],
argv[1]... upto and including a NULL argument acting as a terminator.

execl("name", NULL);

will try and execute a file called "name" in the current directory, giving it a
NULL argv[0] and will scan extra arguments for NULL, invoking undefined
behaviour as no extra arguments were supplied.

Correcting this, and assuming "name" is indeed in the current directory, we
would get:

execl("name", "name", NULL);

However, there still is a problem with this piece of C code : passing NULL to un
unprototyped function or one with a variable list of arguments may not have the
intended effect : NULL can be defined as 0, and thus would be passed as an 'int'
instead of a 'const char*' possibly of different size, and the alternative
definition of NULL as ((void*)0) would also fail to pass the pointer correctly
on weird architectures where all pointer types do not have the same encoding.
One can correct this as:

execl("name", "name", (char*)NULL);

--
Chqrlie.
Nov 14 '05 #26
Eltee <el***@hotmail.com> wrote:
Keith Thompson wrote:
Eltee <el***@hotmail.com> 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.


Then, to avoid confusion, you should rename your (sic!) NG
comp.lang.pure.c, comp.lang.1990iso.c, comp.lang.1999iso.c or
comp.lang.kr.c. ;-)


That's a very old joke. It wasn't funny the first time, either. Why
should one of the oldest groups on Usenet change its policies merely
because some newbies are too arrogant or too stupid to understand
netiquette and read the welcome message?
Otherwise guys like me will bother you with OT
questions all the time. Seriously, would you "reject" some C-related
quesion only because the code snippet illustrating the problem used some
"third party" lib?


Depends. If the problem is, or could easily be, due to the third party
lib, yes. If the lib is completely external to the problem, no.

In your case, your use of not only OS-specific features, but even
completely unrelated languages, was absolutely central to the problem.
This means that your question belongs somewhere that DLLs and dot
com^Hnet are on topic, which isn't here.

Richard
Nov 14 '05 #27
CBFalconer wrote:
Eltee wrote:
Mark McIntyre wrote:


... snip ...
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.


Could be. Could be. Then again such problems can easily be
solved. All it takes is a little smile from the greengrocery
attendant and a direction to a socks shop instead of a (c)rude
"we don't sell socks and we especially don't sell Gatessocks!".

Meanwhile, by ignoring perfectly sound, if terse, advice you have
accomplished getting yourself listed in various PLONK lists, so
that when and if you ever really need advice in this field you just
won't be heard. You'll go far.


Oh, yeah, I forgot that one: greengrocery attendant could hire a bouncer
with strict instructions not to let me in again.

Thanks, CB, I feel more welcome in this NG every day.
Nov 14 '05 #28
Richard Bos wrote:
Then, to avoid confusion, you should rename your (sic!) NG
comp.lang.pure.c, comp.lang.1990iso.c, comp.lang.1999iso.c or
comp.lang.kr.c. ;-)

That's a very old joke. It wasn't funny the first time, either.


Oh, well, not all jokes are funny to all people.
Why
should one of the oldest groups on Usenet change its policies merely
because some newbies are too arrogant or too stupid to understand
netiquette and read the welcome message?


Welcome message? What? Where? How?
Nov 14 '05 #29

"Eltee" <el***@hotmail.com> wrote in message
news:32*************@individual.net...
Richard Bos wrote:
<snip>
Welcome message? What? Where? How?


The latest is still on my server.

MessageID: <cK********************@comcast.com>
Posted by Mr. James Hu.
Nov 14 '05 #30
On Tue, 21 Dec 2004 14:29:59 +0100, Charlie Gordon wrote:
"Lawrence Kirby" <lk****@netactive.co.uk> wrote in message
news:pa***************************@netactive.co.uk ...
On Tue, 21 Dec 2004 11:10:09 +0100, Eltee wrote:
It depends on whether the problem is about issues with C or issues with
the 3rd party lib. For example there is a problem with the code:

execl("name", NULL);

To see that there's a problem you have to know that this is the POSIX
function (C doesn't define it), and that the POSIX execl() takes a
variable argument list of character pointers (the last of which must be a
null pointer). Once you know that the problem itself is entirely a C one.

Not everybody replying may spot that however, nor should they be expected
to.


If we provide the propotype for the execl function, a discussion on what
problems lie in the example is very much on topic:


Yes, if whoever asked a question did that then great. However even if they
didn't do that I'd still answer the question if I knew it has a standard
C answer.
from the Linux man page:

int execl( const char *path, const char *arg, ...);

In the example given, there really are 2 kinds of problems, one related
to the semantics of the execl() library function and system call, that
specifies that the first argument to execl is the pathname of a file to
be executed, the second and subsequent being a list of the arguments
passed to that command as argv[0], argv[1]... upto and including a NULL
argument acting as a terminator.

execl("name", NULL);

will try and execute a file called "name" in the current directory,
giving it a NULL argv[0] and will scan extra arguments for NULL,
invoking undefined behaviour as no extra arguments were supplied.
That isn't a problem for the POSIX execl() function in the sense that

execl("name", (const char *)NULL);

is perfectly valid, if a little odd. If it succeeds it even causes the new
program to be invoked in a conforming way. The null pointer as the second
argument is valid as a terminator for the argument list. Look at the
declaration above for execl(), it is compatible with 2 or more arguments,
just not with 1 or 0 arguments. If "name" refers to an application built
from C code it is valid for the implementation to call main() in it with
argc==0.
Correcting this, and assuming "name" is indeed in the current directory,
we would get:

execl("name", "name", NULL);
That is more normal (barring the issue below) but does't make the two
argument version invalid.
However, there still is a problem with this piece of C code : passing
NULL to un unprototyped function or one with a variable list of
arguments may not have the intended effect : NULL can be defined as 0,
and thus would be passed as an 'int' instead of a 'const char*' possibly
of different size, and the alternative definition of NULL as ((void*)0)
would also fail to pass the pointer correctly on weird architectures
where all pointer types do not have the same encoding. One can correct
this as:


That's less clear. void * is required to have the same representation as
pointers to character types. But you are correct in the more general case.

This is of course the C issue I was referring to in my original post. The
issue about whether the 2nd argument can be null shows the risk of
discussing non-standard code, it can easily move to a discussion of the
non-standard parts. We just have to try to avoid that but it can be tricky.

Lawrence


Nov 14 '05 #31
Eltee wrote:

Thanks, CB, I feel more welcome in this NG every day.


I'm doing the best I can to make you feel as welcome
as I can, but it's not getting any easier.

As another poster pointed out, you will get better
help from this newsgroup on strictly C-related
issues (when you need such help) if you don't make
a boatload of enemies right now.

You're not going to change their minds, believe me
(many have tried and failed), so it might be better
to cut your losses and move on. I don't mean "stop
using this newsgroup"; I just mean that you're onto
a loser and, being a wise chap, you ought to know
when to stop bashing your head against the wall. :-)

When you have a real C question, I hope you'll agree
that you'll get no better help than in this newsgroup.
These guys really are the best at what they do, and
it would be sad if you cut yourself off from their
help for such a silly reason.

Good luck with your C# thing.
Nov 14 '05 #32
Eltee wrote:

Thanks, CB, I feel more welcome in this NG every day.


I'm doing the best I can to make you feel as welcome
as I can, but it's not getting any easier.

As another poster pointed out, you will get better
help from this newsgroup on strictly C-related
issues (when you need such help) if you don't make
a boatload of enemies right now.

You're not going to change their minds, believe me
(many have tried and failed), so it might be better
to cut your losses and move on. I don't mean "stop
using this newsgroup"; I just mean that you're onto
a loser and, being a wise chap, you ought to know
when to stop bashing your head against the wall. :-)

When you have a real C question, I hope you'll agree
that you'll get no better help than in this newsgroup.
These guys really are the best at what they do, and
it would be sad if you cut yourself off from their
help for such a silly reason.

Good luck with your C# thing.
Nov 14 '05 #33
Eltee <el***@hotmail.com> spoke thus:
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++?


These links should put the responses you have received thus far in
context.

http://www.ungerhu.com/jxh/clc.welcome.txt
http://www.eskimo.com/~scs/C-faq/top.html
http://benpfaff.org/writings/clc/off-topic.html

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Nov 14 '05 #34
Eltee wrote:
CBFalconer wrote:

.... snip ...

Meanwhile, by ignoring perfectly sound, if terse, advice you have
accomplished getting yourself listed in various PLONK lists, so
that when and if you ever really need advice in this field you just
won't be heard. You'll go far.


Oh, yeah, I forgot that one: greengrocery attendant could hire a
bouncer with strict instructions not to let me in again.

Thanks, CB, I feel more welcome in this NG every day.


That's bad. Lacking reformation, we would prefer you go away and
harass someone else.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #35
Eltee <el***@hotmail.com> wrote:
Keith Thompson wrote:
Eltee <el***@hotmail.com> 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.

Then, to avoid confusion, you should rename your (sic!) NG
comp.lang.pure.c, comp.lang.1990iso.c, comp.lang.1999iso.c or
comp.lang.kr.c. ;-)
FWIW, this newsgroup was around long before "1999iso" and "1999iso". And it
seems many of the same people are around as well. And I, for one, am
thankful that this place has been diligently maintained as such a unique
forum.

Anyhow, it makes absolutely no sense to ask nor argue questions about
esoteric Windows functionality and interfaces. At the very least it
distracts from those asking pertinent questions about "common" C. At the
worst you'll get all kinds of poor, misleading or downright wrong answers.
Some of the people here, including myself, haven't touched a Windows
computer (let alone code) in years. You need strong peer review to keep
everybody sharp.

You should be thankful that in comp.lang.c the name is interpreted narrowly
and not broadly (your way isn't the only way, and if you put some thought
into it...). I can guarantee that there'll be more than a few times where
you'll find comp.lang.c the best, if not only, place to ask a particular C
question. I hope next time you'll have the sense and graciousness to utilize
it properly.
Otherwise guys like me will bother you with OT questions all the
time.Seriously, would you "reject" some C-related quesion only because the
code snippet illustrating the problem used some "third party" lib?


C# is hardly a "third party C library". Such a question might be answered if
the snippet clearly illustrated a mistake in the C syntax or misuse of a C
construct. Of course, it would help if the poster included an interface
definition of the library. But, as you can see, it quickly becomes a
slippery slope. Would you mind describing in a thousand pages or less C# for
the rest of us so we could answer your question(s)? I would hope you would
mind.

Think before you step.
Nov 14 '05 #36

"Eltee" <el***@hotmail.com> wrote
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.


That's all I need. But, as you can see, I got something completely
different from Martin. Thrice. Only infobahn (thanks again!) gave me
some decent advice.

In my view questions about "how do I call language x from language y" so go
in an ng devoted to language y. So you are actually on topic.
Some people might take the view that these questions belong in the group
devoted to the newer language.
However there is not much help we can offer on how to call C sharp from C.
The standard itself offers no facilities beyond the ability to link objects
defined with "C linkage". However Mr Gates may well have provided some
extensions. I genuinely don't know about this - I do write under Windows but
not programs that make heavy use of OS-specific resources.
Nov 14 '05 #37
Eltee wrote:
Keith Thompson wrote:
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.

That's all I need. But, as you can see, I got something completely
different from Martin.


False. Telling you this is not the place to ask is, except to the
terminal dense, telling you that you need to ask elsewhere.
Thrice.


You can't count. Only two messages were responses to your posts, and
those were to two different posts by you.
message 1) in response to your original off-topic question
message 2) in response to the person answering your off-topic
question with an off-topic answer. BTW, you might
consider whether you could trust his answer. He sent me
an email claiming not to be able to tell that you had
cross-posted to comp.lang.c. This suggests incompetence
on his part.
message 3) in response to your off-topic request that he expand on his
off-topic answer to your off-topic question.
Nov 14 '05 #38
Malcolm wrote:
.... snip eltee annoyances ...
In my view questions about "how do I call language x from language y"
so go in an ng devoted to language y. So you are actually on topic.


No, the question is actually "how do I call language x from
language y when running on system z", and belongs in a group
devoted to system z and all its peculiarities.

--
Chuck F (cb********@yahoo.com) (cb********@worldnet.att.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!
Nov 14 '05 #39
CBFalconer <cb********@yahoo.com> writes:
Malcolm wrote:

... snip eltee annoyances ...

In my view questions about "how do I call language x from language y"
so go in an ng devoted to language y. So you are actually on topic.


No, the question is actually "how do I call language x from
language y when running on system z", and belongs in a group
devoted to system z and all its peculiarities.


The group where the question is topical depends on x, y, and z.

For example, "How do I call C from C++" is topical in comp.lang.c++;
the answer is to use 'extern "C"' (I think that's right). "How do I
call C from Ada" is topical in comp.lang.ada; the answer is to use
Ada's pragma Import(C,...). "How do I call Ada from C" is also
topical in comp.lang.ada; the answer is to use Ada's
pragma Export(C, ...).

If you don't know how to call language x from language y, it's
probably not unreasonable to ask in either comp.lang.x or comp.lang.y
(preferably after doing a little research). If x==c, you're likely to
be directed elsewhere; that's fine as long as you don't insist on
dragging out the discussion.

--
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.
Nov 14 '05 #40
Eltee wrote:

All help will be greatly appreciated. Thanks.


I recommend that you ask this question in a C# newsgroup.
You'll probably have a better reception there.
The reason is simply because there are programmers here
that aren't programming for Microsoft Windows.
( FWIW, I really wish they had C platform specific newsgroups. )
Nov 14 '05 #41
William Ahern wrote:
Otherwise guys like me will bother you with OT questions all the
time.Seriously, would you "reject" some C-related quesion only because the
code snippet illustrating the problem used some "third party" lib?

C# is hardly a "third party C library".


I meant the dll in the C code.

Such a question might be answered if
the snippet clearly illustrated a mistake in the C syntax or misuse of a C
construct. Of course, it would help if the poster included an interface
definition of the library. But, as you can see, it quickly becomes a
slippery slope. Would you mind describing in a thousand pages or less C# for
the rest of us so we could answer your question(s)? I would hope you would
mind.
Nah. After everything I've read in here I don't think that would be a
good idea. However, I do think that you guys are smart enough to grasp
it after less than 1000 pages. After all, it's much less complicated than C.
Think before you step.


[thinking...]
Nov 14 '05 #42
CBFalconer wrote:
Malcolm wrote:

... snip eltee annoyances ...
In my view questions about "how do I call language x from language y"
so go in an ng devoted to language y. So you are actually on topic.

No, the question is actually "how do I call language x from
language y when running on system z",


You (that is I) forgot hardware alpha, electrons beta and universe
gamma. So I guess sci.physics would be in order, too. Maybe even
sci.psychiatry.
and belongs in a group
devoted to system z and all its peculiarities.

Nov 14 '05 #43
Martin Ambuhl wrote:
Eltee wrote:
Keith Thompson wrote:


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.


That's all I need. But, as you can see, I got something completely
different from Martin.

False. Telling you this is not the place to ask is, except to the
terminal dense, telling you that you need to ask elsewhere.
Thrice.

You can't count. Only two messages were responses to your posts, and
those were to two different posts by you.
message 1) in response to your original off-topic question
message 2) in response to the person answering your off-topic
question with an off-topic answer. BTW, you might
consider whether you could trust his answer. He sent me
an email claiming not to be able to tell that you had
cross-posted to comp.lang.c. This suggests incompetence
on his part.
message 3) in response to your off-topic request that he expand on his
off-topic answer to your off-topic question.


Oh, yeah, silly me. Scaring Richard off before he could tell me more,
naturally doesn't count. My bad.
Nov 14 '05 #44
CBFalconer wrote:
Eltee wrote:
CBFalconer wrote:


... snip ...
Meanwhile, by ignoring perfectly sound, if terse, advice you have
accomplished getting yourself listed in various PLONK lists, so
that when and if you ever really need advice in this field you just
won't be heard. You'll go far.


Oh, yeah, I forgot that one: greengrocery attendant could hire a
bouncer with strict instructions not to let me in again.

Thanks, CB, I feel more welcome in this NG every day.

That's bad. Lacking reformation, we would prefer you go away and
harass someone else.


Eventually that's what I'll do, yes. But this harassment thing I don't
understand. How can a simple post be a harassment? It's not like I'm
flooding your mailbox with spam. It's you who decides to read my posts.
As you so smartly put it in one of the previous posts, you could
killfile me in a blink of an eye. And live happily ever after. Or just
ignore this particular thread. One thread, man. Instead you're trying to
split hairs. I admit, my post might have been misplaced but those are
hardly the responses I would expect.

Nevertheless, whether you believe it or not, compared to some other NGs
I'd ... "experienced" in my life ;-) , this is a very civilised
conversation. Seriously.
Nov 14 '05 #45
On Wed, 22 Dec 2004 09:18:15 +0100, Eltee wrote:
CBFalconer wrote:
Malcolm wrote:

... snip eltee annoyances ...
In my view questions about "how do I call language x from language y"
so go in an ng devoted to language y. So you are actually on topic.

No, the question is actually "how do I call language x from
language y when running on system z",


You (that is I) forgot hardware alpha, electrons beta and universe
gamma. So I guess sci.physics would be in order, too. Maybe even
sci.psychiatry.


Well, if MS decides to create different procedures for linking on
different hardware, that might be relevant. Beyond that you should be
looking for the most specific newsgroup where the question is topical.
sci.physics fails on both accounts.

Sometimes you just need to ask the right question, e.g. "I want to link C
code to C# code, does the C language provide any help for me?". The answer
happens to be "no" but you are still a step closer to solving your
problem. A lot this process can be simply narrowing down where to look.

Often applying a bit of thought can help. Given the nature of C and C#,
and the compilers you are using who is likely to provide a specification
of how to interoperate between them?

Lawrence
Nov 14 '05 #46
On Tue, 21 Dec 2004 11:10:09 +0100, in comp.lang.c , Eltee
<el***@hotmail.com> wrote:
Then, to avoid confusion, you should rename your (sic!) NG
comp.lang.pure.c, comp.lang.1990iso.c, comp.lang.1999iso.c or
comp.lang.kr.c. ;-)
We were here first, by about 20 years. If you want to discuss some other
topic, go create a group called comp.lang.cish-dialects. Or use one of the
already existing groups that are already devoted to platform specific
programming.
Otherwise guys like me will bother you with OT
questions all the time.
Only if you fail to follow nettiquette and don't lurk, read the FAQ and
welcome message before posting.
Seriously, would you "reject" some C-related
quesion only because the code snippet illustrating the problem used some
"third party" lib?


If the problem was due to or about how the 3rd party lib worked, yes.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 14 '05 #47
On Tue, 21 Dec 2004 15:19:01 +0100, in comp.lang.c , Eltee
<el***@hotmail.com> wrote:

Welcome message? What? Where? How?


This is why nettiquette (you /did read news.newusers didn't you?) requires
you to LURK for a while. That way you'd have seen the regular welcome
message that's posted, along with the FAQ.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 14 '05 #48
On Wed, 22 Dec 2004 09:12:30 +0100, in comp.lang.c , Eltee
<el***@hotmail.com> wrote:
William Ahern wrote:
Otherwise guys like me will bother you with OT questions all the
time.Seriously, would you "reject" some C-related quesion only because the
code snippet illustrating the problem used some "third party" lib?

C# is hardly a "third party C library".


I meant the dll in the C code.


But DLLs are a windows-specific construct, and nothing to do with C. You
can create them in pascal, C++, C#, VB, assembler etc etc. So asking about
them here is verging on the insane...

(of C#)However, I do think that you guys are smart enough to grasp
it after less than 1000 pages.


Probably many of us programme in the blasted language. That doesn't mean we
want to talk about it here.
I also have a telescope, commute to London every day and collect the dried
skulls of cobol programmers and end-users who crossed me at budget time.
But I talk about those in more appropriate groups.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 14 '05 #49
On Tue, 21 Dec 2004 11:24:11 +0100, in comp.lang.c , Eltee
<el***@hotmail.com> wrote:
Mark McIntyre wrote:
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.


Could be. Could be. Then again such problems can easily be solved. All
it takes is a little smile from the greengrocery attendant


Yes, and in general this is what happens - people say "offtopic, try
comp.unix.programming" or whatever.

But remember that it relies on the greengrocer knowing where a sock shop
is. Maybe he's from out of town. Maybe he directs you to a ladies hosiery
shop by mistake or for a laugh. Maybe in his town "socks" are a euphemism
for a marital aid. Maybe he's tired, hassled and grumpy.
--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 14 '05 #50

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

Similar topics

23
by: Fabian Müller | last post by:
Hi all, my question is as follows: If have a class X and a class Y derived from X. Constructor of X is X(param1, param2) . Constructor of Y is Y(param1, ..., param4) .
35
by: hasho | last post by:
Why is "call by address" faster than "call by value"?
13
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make...
4
by: John | last post by:
Hi all, This really is quite an urgent matter. I have a page with multiple, dynamically-loaded user controls and when a user clicks on a button, the whole form is submitted. Now at this stage...
5
by: Amaryllis | last post by:
I'm trying to call a CL which is located on our AS400 from a Windows application. I've tried to code it in different ways, but I seem to get the same error every time. Does anyone have any clue...
13
by: mitchellpal | last post by:
i am really having a hard time trying to differentiate the two..........i mean.....anyone got a better idea how each occurs?
13
by: shsingh | last post by:
I have a class A containing some map as data variables. I creat an object of class A on heap by allocatiing memory by using "malloc". This will return me the required memory but the object is not...
3
by: cberthu | last post by:
Hi all, Is it possible to have two connects in the same rexx script to different DB's? I have to get data form on DB (with specifics selects and filter out some values with RExx) and save the...
9
by: CryptiqueGuy | last post by:
Consider the variadic function with the following prototype: int foo(int num,...); Here 'num' specifies the number of arguments, and assume that all the arguments that should be passed to this...
12
by: Rahul | last post by:
Hi Everyone, I have the following code and i'm able to invoke the destructor explicitly but not the constructor. and i get a compile time error when i invoke the constructor, why is this so? ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
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
0
BarryA
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...
1
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...
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
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...
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...

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.