Chris said:
Richard Heathfield wrote:
Richard, old bean, I think you're losing it. Step back, draw several
deep breaths, have a coffee/tea/chocolate/whatever, and stop ratholing
into the details: in this case, they're a distraction. And they're off-
topic. And in this case, it's making you look like an idiot, and I'd
rather that you didn't -- it doesn't suit you.
This is kind of curious.
Let's come back to the original problem:
A user wanted an overview/clarification about dynamic linking.
I gave him a short description. I think it is important, and
since C is a systems related language, this is not
very off topic. Linking (and dynamic linking belongs to the
linking process) is part of the language, even if it is always
system specific.
I mentioned that all programs under windows must use dynamic
linking since essential system functions like ExitProcess
must be called through the kernel32.dll dynamic linking API.
This then, degenerated in a frantic race to prove me
wrong using some kind of funny argument. First, an assembly
interface to the kernel functions of windows was proposed,
then a program with an infinite loop that would NOT call ExitProcess
at exit, then, (and this is the most extreme) just pull the
plug.
OK. I admit that if you pull the plug, the process will NOT
call ExitProcess unless the machine is using an UPS.
I admit also that if you use an assembler interface (not
the C interface) you could avoid having a reference to ExitProcess
in your executable and you would not need dynamic linking
(maybe is that possible, I do not know, and it is really off topic
here since we are discussing C and not assembly). That would
tie your program to a specific version of the ntdll.dll, making
the program unusable with the next service pack. But maybe
this doesn't matter, I do not know.
The point I wanted to do is that many systems use dynamic
linking (windows and unix for example) and that an answer to
a specific question about dynamic linking is appropiate in this
Newsgroup.
That is all.