What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Call DisplayToast from dll

Call DisplayToast from dll
Author: Message:
Hyriuu
New Member
*


Posts: 1
Joined: May 2011
O.P. Call DisplayToast from dll
Hi,

I need your help, I would like call DisplayToast function from an external libraries (called with Interop::Call function) that I am writing in C#, is it possible ? how ?


This post was edited on 05-19-2011 at 08:35 PM by Hyriuu.
05-19-2011 08:34 PM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Call DisplayToast from dll
First of all, the function Interop::Call is Plus!-scripting code to call procedures in external libraries, it's to be used from within a Plus! script. You don't use it for invoking a toast.

Anyways, this said, I think I know what you actually mean/want, and yes you can invoke a Plus!-toast from inside an external library (provided Plus! is loaded of course). You can do it in several ways:

1) Use the old plugin-style way of invoking a toast by registering and then broadcasting the Windows message "MessengerPlus_DisplayToast". Example: J-Thread's reply to how to catch the MessengerPlus_DisplayToast in VB.NET or C#?
(this method was used in the old plugin system of Messenger Plus! 3, but it is still supported afaik. You don't need anything extra for this.)

2) Create a supporting Messenger Plus! script which creates a custom hidden Plus! window. In the script you subclass that hidden window and you listen to an incoming custom Windows message to that window. If you recieve the proper message, you invoke the DisplayToast Plus!-function from within the script, using the parameters set by your external code in some memory address (that memory address is send to your script via that custom Windows message in the form of a DWORD sized parameter). So, the external library/tool must simply set the needed parameters in some memory address, and then send a custom Windows message with that address as parameter to the (hidden) Plus!-window.
This method is used in the SendTo script to send files.
(this methods needs an additional Messenger Plus! script which creates a (hidden) window)

3) You can maybe, in some way, get the MsgPlus interface object and use it that way. Though I have no real clue how to do this. Also, it might be impossible without again creating a supporting script.
(this methods probably needs an additional Messenger Plus! script?)

This post was edited on 05-19-2011 at 10:16 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
05-19-2011 10:09 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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