[program-l] Re: Visual basic .net: setting a startup routine when creating a dynamic link library

  • From: "Littlefield, Tyler" <tyler@xxxxxxxxxxxxx>
  • To: program-l@xxxxxxxxxxxxx
  • Date: Thu, 04 Oct 2012 09:54:37 -0600

Hello Pranav:
There is no dllMain in a class library.
Perhaps this helps:
http://social.msdn.microsoft.com/Forums/en/netfxbcl/thread/844e1402-14df-4ac1-b0a0-43ad5d3f5d5e
most importantly:

   To substitute for DLLMain, you could employ a static constructor on
   the class you're exporting to fire your initialization code. It will
   fire in a thread-safe
   manner the first time the type is accessed, prior to execution of
   any other code in that type. Check here for more info:
   http://msdn2.microsoft.com/en-us/library/Aa645612(VS.71).aspx

HTH,
On 10/4/2012 7:25 AM, Pranav Lal wrote:
Hi all,

I am trying to create a dynamic link library using visual basic express
2010. I have created a class library and have written my class. I believe I
need to set an entry point for the dll. How do I do this? Do I need to add a
module with a main subroutine?

Pranav

** To leave the list, click on the immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=unsubscribe]
** If this link doesn't work then send a message to:
** program-l-request@xxxxxxxxxxxxx
** and in the Subject line type
** unsubscribe
** For other list commands such as vacation mode, click on the
** immediately-following link:-
** [mailto:program-l-request@xxxxxxxxxxxxx?subject=faq]
** or send a message, to
** program-l-request@xxxxxxxxxxxxx with the Subject:- faq


--
Take care,
Ty
http://tds-solutions.net
The aspen project: a barebones light-weight mud engine:
http://code.google.com/p/aspenmud
He that will not reason is a bigot; he that cannot reason is a fool; he that 
dares not reason is a slave.

Other related posts: