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-21-2004
Keith Thompson wrote:
> 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.


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.

 
Reply With Quote
 
 
 
 
Eltee
Guest
Posts: n/a
 
      12-21-2004
Mark McIntyre wrote:
> 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.


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


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).
 
Reply With Quote
 
 
 
 
Keith Thompson
Guest
Posts: n/a
 
      12-21-2004
Eltee <(E-Mail Removed)> writes:
> Keith Thompson wrote:
>> 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.

>
> 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) 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
 
Lawrence Kirby
Guest
Posts: n/a
 
      12-21-2004
On Tue, 21 Dec 2004 11:10:09 +0100, Eltee wrote:

> Keith Thompson wrote:
>> 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.

>
> 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
 
Reply With Quote
 
CBFalconer
Guest
Posts: n/a
 
      12-21-2004
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 ((E-Mail Removed)) ((E-Mail Removed))
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net> USE worldnet address!


 
Reply With Quote
 
Charlie Gordon
Guest
Posts: n/a
 
      12-21-2004
"Lawrence Kirby" <(E-Mail Removed)> wrote in message
news(E-Mail Removed) ...
> 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.


 
Reply With Quote
 
Richard Bos
Guest
Posts: n/a
 
      12-21-2004
Eltee <(E-Mail Removed)> wrote:

> Keith Thompson wrote:
> > 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.

>
> 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
 
Reply With Quote
 
Eltee
Guest
Posts: n/a
 
      12-21-2004
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.
 
Reply With Quote
 
Eltee
Guest
Posts: n/a
 
      12-21-2004
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?
 
Reply With Quote
 
dandelion
Guest
Posts: n/a
 
      12-21-2004

"Eltee" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Richard Bos wrote:


<snip>

> Welcome message? What? Where? How?


The latest is still on my server.

MessageID: <(E-Mail Removed)>
Posted by Mr. James Hu.


 
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