Q. for Patchou: thread-safety in plugins - Printable Version -Shoutbox (https://shoutbox.menthix.net) +-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58) +--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4) +---- Forum: Scripting (/forumdisplay.php?fid=39) +----- Forum: Plug-Ins (/forumdisplay.php?fid=28) +------ Thread: Q. for Patchou: thread-safety in plugins (/showthread.php?tid=16175) Q. for Patchou: thread-safety in plugins by PsychoMark on 10-02-2003 at 11:38 AM
This is a question for Patchou (or anyone who has a good knowledge of the internal workings of Plus)... in what way are plugins called? Specifically, do I need to take synchronization into account? RE: Q. for Patchou: thread-safety in plugins by Whacko on 10-02-2003 at 02:18 PM
As far as i know the plugins are loaded in the main thread. in an earlier version of Plus! the Initialize() function was called in a seperate thread, but this didnt work right, cos after Initialize was done everything dynamically created in there (forms etc) were free'd automatically so since a few versions, evrything is called in the mainthread again RE: Q. for Patchou: thread-safety in plugins by Whacko on 10-02-2003 at 02:19 PM
the template is a bit messy, i must confess RE: Q. for Patchou: thread-safety in plugins by PsychoMark on 10-02-2003 at 02:28 PM
I did my own translation of the header, but yours was helpfull in ironing out a few bugs, thanks for that! Nice to see not everyone is using VB (or C) here RE: Q. for Patchou: thread-safety in plugins by lopardo on 12-06-2003 at 06:47 AM
Hi guys. Sorry for bringing this old thread up... RE: Q. for Patchou: thread-safety in plugins by PsychoMark on 12-06-2003 at 01:48 PM
I'm not sure if it's the latest or best, but I'll just post my version of the headers. These have been used in WMPlus and SOF2Plus (which hasn't been very publicly released, but if any SOF2 fans want yet another sounds plugin, just shout). Note that these do not yet contain the Unicode declarations for the functions, only the structures for that have been converted. The prototypes for the functions are in comments in the unit, you can copy these to your DLL project and export them... if you want an example on how to use this just let me know and I'll fix something... or take a look at the other Delphi translation posted here on these forums... RE: Q. for Patchou: thread-safety in plugins by lopardo on 12-06-2003 at 05:05 PM OK, thanks a lot. And keep us informed if you do anything new RE: Q. for Patchou: thread-safety in plugins by lopardo on 12-07-2003 at 12:21 AM Hey, do you know how could I get the Winamp song title from Plus (the (!WAT) tag) and how could I set the nickname through Plus (/nick xxx)? I really couldn't find that out for myself RE: Q. for Patchou: thread-safety in plugins by PsychoMark on 12-07-2003 at 09:45 AM
Getting the Winamp song isn't that hard, there's an example posted on the NSDN (here, at the bottom, just have to convert it to Delphi). If I'm correct (but don't quote me on this though) you can return commands from your plugin which will be processed by Plus!. I have not yet tried this, so I can't be 100% sure. The problem with nickname changers is that plugins react only on commands typed by the user, so for the song-nickname to work they'd have to type in "/xyourcommand" every time they want to update it... this would make your plugin quite obsolete, as they can just use "/nick (!WAT)"... |