What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Delphi Plugin Framework

Delphi Plugin Framework
Author: Message:
PsychoMark
Full Member
***

Avatar

Posts: 151
41 / – / –
Joined: Apr 2002
O.P. Delphi Plugin Framework
(sticky maybe?)

For anyone interested in writing Plus! plugins in Delphi, there has been the Delphi Template kindly provided by Whacko. However, while writing several plugins I noted the same pattern over and over again, and got tired of it. So today I wrote a framework for Delphi plugins, and I'm releasing it as open-source...

So what's so special about it? Well, here goes:

  • Full translation of the latest SDK C++ source, including some corrections over Whacko's version
  • Object Orientated way of writing plugins
  • Several wrapper functions for formatting your output, including smart TColor to Plus! color conversion


And what is missing:

  • Implementation of Unicode functions (due to a lack of experience in that area)



The way it's implemented you must create a class descending from TMPPlugin and call RegisterPlugin in the DLL's entry point (the default begin-end you get when creating a DLL project). Override the Initialize function, register your commands (including tags or notifications) and the framework will take over from there, adding your commands to the Plus! plugins menu, calling your callback functions when a command is found. Need more processing? Override the various Execute methods to tap into the processing since all functions are declared as virtual!

Didn't understand a word I was just saying? Not to worry, I've included a demo project showing a plugin with two commands, one tag and a notification.

The advantage of this framework is you no longer have to copy and paste all the code to keep it C++-compatible, the framework takes care of that. No worrying about exports, pointers, correct calling conventions or returning strings longer than the Plus! buffers can handle... all taken care of :)


Before I start to sound like a Tel-Sell comercial, I'll just attach the demo plugin, Plus! SDK conversion and framework. Hope it helps someone as much as it helps me :)




Any feedback, bugs, fixes or Unicode implementations are of course appreciated, what else did I open-source it for eh? :)

.zip File Attachment: DelphiMPPluginSDK.zip (103.28 KB)
This file has been downloaded 1701 time(s).

This post was edited on 05-24-2004 at 11:26 AM by PsychoMark.
02-19-2004 03:34 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Delphi Plugin Framework - by PsychoMark on 02-19-2004 at 03:34 PM
RE: Delphi Plugin Framework - by PsychoMark on 02-19-2004 at 05:07 PM
RE: Delphi Plugin Framework - by tiojoca on 02-19-2004 at 06:07 PM
RE: Delphi Plugin Framework - by PsychoMark on 02-22-2004 at 04:10 PM
RE: Delphi Plugin Framework - by quietbritishjim on 05-22-2004 at 01:55 PM
RE: Delphi Plugin Framework - by Whacko on 05-23-2004 at 12:23 PM
RE: Delphi Plugin Framework - by PsychoMark on 05-23-2004 at 07:03 PM
RE: Delphi Plugin Framework - by PsychoMark on 05-24-2004 at 11:25 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On