William
Thu Jul 21 20:04:08 CDT 2005
<aaronfude@gmail.com> wrote in message
news:1121992892.109038.296220@g47g2000cwa.googlegroups.com...
> MSDN documentation states:
>
> "The name DllMain is a placeholder for a user-defined function. You
> must specify the actual name you use when you build your DLL."
>
> How do you actually accomplish that? I have not been able to find that
> in the VC.Net documantation.
Short answer: Use the /ENTRY linker option
Longer answer: You don't want to do that
Comprehensive answer: See here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_Run.2d.Time_Library_Behavior.asp
To make a long story short, the operating system doesn't care a whit about
the name of the function. But when using VC++, _it_ sets the entry point at
its own runtime's initialization. That done, it calls your initializer.
Maybe it would be nice if it let you choose the name you like, but it
doesn't. Just it has been carved in stone that there must be main() or
WinMain() ...
Regards,
Will