Results 1 to 2 of 2

Thread: dll

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2001
    Posts
    163

    dll

    When to use dllmain and when just use function in dll file?
    Purushottam

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    If you need to initialise some extra data, you use DllMain. It gets executed every time either a process or a thread attaches to it (it tells you in the parameters what's happening). It is also called when it is unloaded as well.

    So basically, if you had functions in your DLL to print signs, you might load the actual sign images in DllMain, then just use them from memory as necessary
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width