Re: Creating DLL Entry Point
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Wed, 5 Sep 2007 16:58:46 -0400
FFrozTT <tech@xxxxxxxxxxxxxxxx> wrote:
I have a small project that works fine as an EXE. Now I want to make
it into a DLL. I've created a DllMain routine and set it as the
entry
point (code below). Then from DllMain I try to initialize my main
routine called ThreadProc. I've tryed this several different ways
and
can't get it to work. It compiles fine but when I go rundll32
mydll.dll nothing happenes (works in exe form.)
You pass incorrect parameters to rundll32. I suspect it fails before
even loading your DLL.
If you insist on using rundll32, see
http://support.microsoft.com/kb/164787
You need to implement and export a function with a particular signature,
and do all your work there. Creating a new thread is rather pointless -
rundll32 will unload the DLL and terminate as soon as your entry point
returns.
--
With best wishes,
Igor Tandetnik
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925
.
- References:
- Creating DLL Entry Point
- From: FFrozTT
- Creating DLL Entry Point
- Prev by Date: Re: converting char to LPCTSTR?
- Next by Date: Re: converting char to LPCTSTR?
- Previous by thread: Re: Creating DLL Entry Point
- Next by thread: Re: Creating DLL Entry Point
- Index(es):
Relevant Pages
|