>> <kelvin.koo...@googlemail.com> wrote in message
>>
[quoted text clipped - 38 lines]
> syntax and I'm not sure what the right way to declare an array of
> constant strings in .NET is.
The correct way to do anything in .NET 1.1 is with C#. C++ code on .NET 1.1
suffers from the loader lock bug, and there is no workaround except for
upgrading to .NET 2.0 and VS 2005. Even the "/clr:pure" option that
prevents mixed-mode compilation isn't available until VC++ 2005.
So find whoever is mandating VS 2003, and show them this:
http://www.codeproject.com/scrapbook/semicolon_2.asp
and this: http://msdn2.microsoft.com/en-us/library/ms173266(vs.80).aspx
and this: http://msdn2.microsoft.com/En-US/library/aa290048(vs.71).aspx
Specifically:
"Second, when loading DLLs in versions 1.0 and 1.1 of the .NET Framework,
the CLR assumed that the loader lock was not held and performed several
actions that are invalid under loader lock. Assuming the loader lock is not
held is a valid assumption for purely .NET DLLs, but, because mixed DLLs
execute native initialization routines, they require the native Windows
loader and therefore the loader lock. Consequently, even if the developer
was not attempting to execute any MSIL functions during DLL initialization,
there was still a small possibility of nondeterministic deadlock with
versions 1.0 and 1.1 of the .NET Framework."
"Consequently, due to the way the loader works in version 1.0 and 1.1 of the
common language runtime, deadlock situations are always possible with mixed
DLLs, even though they are often quite rare in practice. The worst part of
this is that mixed DLLs that happen to work on most systems can begin
deadlocking if the system is stressed, the image is signed (since the
security functionality require more managed code to run during assembly
load), hooks are installed into the system, or the behavior of the runtime
changes through service packs or new releases. In summary, this is a serious
problem that must be addressed for all mixed DLLs."
I'm sorry, but there is no rationale for staying with VS 2003 that can
possibly trump a latent nondeterministic deadlock.