M
Michael Roper
In Jesse Liberty's "Programming in C#" he says that "...an assembly must
have exactly one entry point: DLLMain, WinMain, or Main. DLLMain is the
entry point for DLLs..."
In the MSDN ".Net Framework Developer's Guide" it says that "...each
assembly can have only one entry point (that is, DllMain, WinMain, or
Main..."
So we've got "must" vs. "can" and "DLLMain" vs. "DllMain."
In playing with this, it doesn't appear to make any difference whether it's
included or not, or how it's spelled. It also never seems to get called
automatically upon loading. Since there aren't any variables living outside
of class scope in C#, it further seems that there wouldn't be much call (eh,
sorry) for DllMain anyway.
Can someone enlighten me as to the purpose and usage of DllMain in a pure
managed-code class library assembly? Is it possible to get it called
automatically when the assembly is loaded if one had reason to need such a
feature?
Thanks.
Michael Roper
have exactly one entry point: DLLMain, WinMain, or Main. DLLMain is the
entry point for DLLs..."
In the MSDN ".Net Framework Developer's Guide" it says that "...each
assembly can have only one entry point (that is, DllMain, WinMain, or
Main..."
So we've got "must" vs. "can" and "DLLMain" vs. "DllMain."
In playing with this, it doesn't appear to make any difference whether it's
included or not, or how it's spelled. It also never seems to get called
automatically upon loading. Since there aren't any variables living outside
of class scope in C#, it further seems that there wouldn't be much call (eh,
sorry) for DllMain anyway.
Can someone enlighten me as to the purpose and usage of DllMain in a pure
managed-code class library assembly? Is it possible to get it called
automatically when the assembly is loaded if one had reason to need such a
feature?
Thanks.
Michael Roper