mIRC Home    About    Download    Register    News    Help

Print Thread
#185407 09/09/07 06:08 AM
Joined: Aug 2007
Posts: 72
P
Babel fish
OP Offline
Babel fish
P
Joined: Aug 2007
Posts: 72
How come after reading many reviews at several scripting sites... It seems as if people don't like addons that use dll's?

When anyone posts screenshots on sites like mircscripts.org I see alot of comments saying.... "This addon would be better if it didn't use dll's" or "That dialog would be better if it didn't use DCX"

Is it a performance issue?
What's the big deal with using dlls?

I mean I thought dll's were suppose to speed things up...


mIRC Scripting: So easy a caveman could do it.
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
They say it from a design perspective. Using DLLs to compensate for functionality that mIRC lacks is arguably not a *clean* implementation from a design point of view. The argument is that any implementation would be best if it consistently used only one language the whole way through, rather than multiple. Unfortunately, this is a very simplistic and, generally, a rather unrealistic argument to make when dealing with interoperability of large systems-- so it's really a matter of people being a bit too picky.

In the real programming world there is a saying, "use the right tool for the right job," which would be the counter argument in this case. There's absolutely nothing wrong with DLLs- they have *better* peformance (FAR better performance), they deal with the Windows API much better, etc.. They're just not written in mIRC, which for some, makes it harder to write code in. This shouldn't affect users of such DLLs though.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Aug 2007
Posts: 72
P
Babel fish
OP Offline
Babel fish
P
Joined: Aug 2007
Posts: 72
ahhh ok i see, thx. makes sence...

1 more question..

Do dll's have to be made *for* mIRC...

Or is it possible to use dll's made for other programs?


mIRC Scripting: So easy a caveman could do it.
Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
mIRC only knows how to make use of DLLs that were written for it; the functions need to have a specific function header and take a specific number of parameters (see /help DLL Support). That said, given any DLL that was *not* written for mIRC, it's relatively easy to write a wrapper function to make it usable in mIRC.

Keep in mind though, that a dll written for another program probably won't do much for mIRC, unless the functions it provides aren't coupled to the program it was written for. For example, a DLL for MSN that takes care of theming the message windows will be utterly useless in the context of mIRC- it's very much specific to the application. Of course, if another DLL had a function gettime() which retrieved the accurate time of day from an up-to-date NTP server for the application, this uncoupled (independent) function could be easily used (with a wrapper).. Of course again, if the gettime() function was implemented to send messages directly back to the application in some specific way (a MessageBox, for instance, or filling in a dialog box or table) instead of returning the raw value, this would render it a pretty useless function to use with mIRC, so you can see how not just any DLL is right for the job.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Some DLL's that haven't been made for mIRC can be used directly by mIRC, but you have to use COM Objects to access them, rather than the /dll, $dll, etc. options


Link Copied to Clipboard