|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Assembly initializer.Is there anyway to write an assembly DLL that has an initializer that is
automatically called before any other methods in the assembly? I am thinking along the lines of a DllMain similar to that which is in standard C++ DLLs. -- ----------------------------------- Ken Varn Senior Software Engineer Diebold Inc. EmailID = varnk Domain = Diebold.com ----------------------------------- Ken,
>Is there anyway to write an assembly DLL that has an initializer that is The CLR supports such a feature starting with 2.0, but it also>automatically called before any other methods in the assembly? I am >thinking along the lines of a DllMain similar to that which is in standard >C++ DLLs. requires language support. IL Assembler, and I believe also C++, lets you define module initializers, but other languages such as C# and VB do not. Mattias -- Mattias Sjögren [C# MVP] mattias @ mvps.org http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com Please reply only to the newsgroup. I am using managed C++. Can I use a DllMain in C++ with the 1.1 Framework?
-- Show quote----------------------------------- Ken Varn Senior Software Engineer Diebold Inc. EmailID = varnk Domain = Diebold.com ----------------------------------- "Mattias Sjögren" <mattias.dont.want.spam@mvps.org> wrote in message news:%23bNIbFTpGHA.4268@TK2MSFTNGP04.phx.gbl... > Ken, > > >Is there anyway to write an assembly DLL that has an initializer that is > >automatically called before any other methods in the assembly? I am > >thinking along the lines of a DllMain similar to that which is in standard > >C++ DLLs. > > The CLR supports such a feature starting with 2.0, but it also > requires language support. IL Assembler, and I believe also C++, lets > you define module initializers, but other languages such as C# and VB > do not. > > > Mattias > > -- > Mattias Sjögren [C# MVP] mattias @ mvps.org > http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com > Please reply only to the newsgroup. |
|||||||||||||||||||||||