Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / July 2006

Tip: Looking for answers? Try searching our database.

Assembly initializer.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ken Varn - 11 Jul 2006 15:42 GMT
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.

Signature

-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------

Mattias Sjögren - 11 Jul 2006 22:32 GMT
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

Signature

Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

Ken Varn - 12 Jul 2006 14:12 GMT
I am using managed C++.  Can I use a DllMain in C++ with the 1.1 Framework?

Signature

-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------

> Ken,
>
[quoted text clipped - 9 lines]
>
> Mattias

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.