OK, I think I finally understand. The wel_hook.dll is needed by other
Eiffel application itself. That is why it must be a DLL.
name-based model that requires apps to provide their own DLLs. It's
Roger F. Osmond
> -------- Original Message --------
> Subject: Re: [eiffel_software] wel_hook.dll ?
> From: "Jocelyn Fiat [ES]" <
[hidden email]>
> Date: Fri, September 25, 2009 11:19 am
> To:
[hidden email]
> In order to see the effect of the wel_hook.dll
> here is a simple way to do
> 1) Now, open EiffelStudio and load a project.
> Right-Click on a (clickable) class name and move your mouse pointer
> out of your EiffelStudio's window.
> You will notice the dotter line goes out of the window, and is still
> drawned
> 2) Now, check in all your folder included in %PATH% , and also the
> folder containing ec.exe
> and remove (or rename) all occurrences of wel_hook.dll
> close all your EiffelStudio's instances
> retry 1)
> You will notice your class "icon" and the P&D dotted line stops at
> the border of the EiffelStudio's window
> So this was to show what the wel_hook.dll is for , useful when you want
> to P&D a class from an EiffelStudio's window to another one.
> Now, why using a dll?
> Simply because this is the way to achieve that with Windows.
> I think this is called the system wide hook.
> And I think that when EiffelStudio (for instance) is launched, it will
> declare this dll as a system hook for the mouse (and I guess for the
> keyboard too).
> And then the other graphical application will also load this
> wel_hook.dll ...
> Then, yes Windows needs this to be a DLL, since it will be loaded by
> other graphical applications.
> For the technical details, I let you google for it.
> Does it answer the question?
> If not, I will try to find a technical explanation on the web.
> -- Jocelyn
> > On the DLL front, perhaps it's my lack of understanding, or I am not
> > expressing myself adequately.
> >
> > I accept that the function is necessary. That is not the issue.
> >
> > What I do not understand is why that function must reside in a DLL and
> > not within the static WEL library.
> >
> > A DLL is essentially the same as a static library except that it is
> > identified, not linked, at the end of the compilation sequence. A DLL
> > is typically chosen because it is needed by multiple clients and because
> > it is either more convenient or more space-efficient to distribute that
> > logic separately (rather than embedding it into every possibly client).
> > It is a question of form, not of function.
> >
> > As I see it, those advantages are no match for the serious disadvantage
> > of requiring that we distribute, install, locate and so forth an
> > additional file for our othewise ordinary Eiffel Vision apps. It
> > effectively precludes offering a standalone application, and requires
> > some form of installation program. That stinks.
> >
> > So, I will pose my question one more time.
> >
> > Why is is not possible to move the logic, currently in wel_hook.dll,
> > into the wel library?
> >
> >
> > R
> >
> > ==================================================
> > Roger F. Osmond
> >
> >
> >
> >> -------- Original Message --------
> >> Subject: Re: [eiffel_software] wel_hook.dll ?
> >> From: "Jocelyn Fiat [ES]" <
[hidden email]>
> >> Date: Fri, September 25, 2009 9:51 am
> >> To:
[hidden email]
> >>
[hidden email] wrote:
> >>
> >>> Hi Manu!
> >>>
> >>> More to the point, the dll must be in your path for it to be found.
> >>> If placed 'next to' your executable, it will work only if that place is
> >>> the working directory (it often is). The default working directory in
> >>> estudio workbench mode is the W_code directory, which is why placing it
> >>> there makes it work.
> >>>
> >>>
> >> Note that the default working directory when launched by EiffelStudio is
> >> the folder containing the .ecf file.
> >> This is not anymore the W_code since 6.3 (or 6.4)
> >> This change was made to help developer, then no need to copy test file,
> >> or pixmap, or dll in their W_code after each compilation (from scratch).
> >>
> >>> Now, back to the gnarly part.
> >>> The reasons for having the function in wel_hook are clear thanks to you
> >>> earlier explanation, but my question about the reason for a DLL versus a
> >>> static library remain unanswered. Why is that not an option?
> >>>
> >>>
> >> As Manu explained, we use the .dll in order to add a mouse (and
> >> keyboard) hook (system-wide hook).
> >> And this has to be done at the system level.
> >> Mainly because the application needs to be able to draw the P&D line
> >> (and also handle the Escape key) *when the mouse cursor is not over the
> >> Eiffel application.
> >> *This is how Windows works using dll.
> >> If ever you know another solution, then please let ISE know.
> >> hope this helps,
> >> Jocelyn
> >> PS: maybe the warning in the console might be annoying.
> >>
> >>> R
> >>>
> >>> ==================================================
> >>> Roger F. Osmond
> >>>
> >>>
> >>>
> >>>
> >>>> -------- Original Message --------
> >>>> Subject: RE: [eiffel_software] wel_hook.dll ?
> >>>> From: "Emmanuel Stapf [ES]" <
[hidden email]>
> >>>> Date: Wed, September 23, 2009 12:29 pm
> >>>> To: <
[hidden email]>
> >>>>
> >>>>
> >>>>> Manu, I think you must copy the dll to the w_code directory? I know it
> >>>>> is not that much trouble but I seem to repeatedly delete the eifgen
> >>>>> directory (perhaps a bad habit pattern from earlier versions of
> >>>>> EiffelStudio no longer required). But, is there a way to put the dll in
> >>>>> a more perminant directory and have systems pick up on it?
> >>>>>
> >>>>>
> >>>> Personally, I've created a directory `c:\bin' and added it to my PATH environment
> >>>> variable and this is where `wel_hook.dll' is. Of course this only works because it
> >>>> is my development machine. For deployment, you have to put `wel_hook.dll' next to
> >>>> your executable.
> >>>> Regards,
> >>>> Manu
> >>>>
> >>>>
> >>>
> >>> ------------------------------------
> >>>
> >>> Yahoo! Groups Links
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >> --
> >> Jocelyn
> >> ------------------------------------------------------------------------
> >> Eiffel Software
> >> 805-685-1006
> >>
http://www.eiffel.com
> >> Customer support:
http://support.eiffel.com
> >> User group:
http://groups.eiffel.com/join
> >> ------------------------------------------------------------------------
> >>
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> --
> Jocelyn
> ------------------------------------------------------------------------
> Eiffel Software
> 805-685-1006
>
http://www.eiffel.com
> Customer support:
http://support.eiffel.com
> User group:
http://groups.eiffel.com/join
> ------------------------------------------------------------------------