What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » [C#] Write to MsgPlus Event Log

[C#] Write to MsgPlus Event Log
Author: Message:
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: [C#] Write to MsgPlus Event Log
Ok I did test it and this works:

In Utilities.cs, make the following code:
code:
[ComVisible(false)]
public class Utilities
{
    const int HWND_BROADCAST = 0xFFFF;
    [DllImport("user32", EntryPoint="RegisterWindowMessageA")] public static extern int RegisterWindowMessage([MarshalAs(UnmanagedType.LPStr)]string lpString);
    [DllImport("user32", EntryPoint="SendMessageA")] public static extern int SendMessage(int hwnd, int wMsg, int wParam, int lParam);

    public Utilities()
    {
    }
    public static bool AddEventEntry(string sUser, string sEvent)
....(here the rest of my function)

Then your other function should be:
code:
private bool addEventLog(string thisContact, string thisTitle, string thisArtist)
{
RegistryKey rootPath = Registry.CurrentUser.OpenSubKey("Software\\Jedimark\\Music Logger Plus");
string logStatus = rootPath.GetValue("LogToPlus").ToString();
if (logStatus.Equals("true"))
{
Utilities.AddEventEntry(thisContact, language[18] + " " + thisTitle + " " + language[19] + " " + thisArtist);
return true;
}
return false;
}

So remove the namespace. This should all work. By the way, do you see an error or something? How do you know it isn't working?
10-07-2005 08:08 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[C#] Write to MsgPlus Event Log - by andersona91 on 10-03-2005 at 06:00 PM
RE: [C#] Write to MsgPlus Event Log - by J-Thread on 10-03-2005 at 06:21 PM
RE: [C#] Write to MsgPlus Event Log - by J-Thread on 10-04-2005 at 07:14 PM
RE: [C#] Write to MsgPlus Event Log - by Jedimark on 10-04-2005 at 09:50 PM
RE: [C#] Write to MsgPlus Event Log - by J-Thread on 10-05-2005 at 05:48 AM
RE: [C#] Write to MsgPlus Event Log - by CookieRevised on 10-05-2005 at 02:35 PM
RE: [C#] Write to MsgPlus Event Log - by Jedimark on 10-06-2005 at 07:12 PM
RE: [C#] Write to MsgPlus Event Log - by J-Thread on 10-06-2005 at 08:17 PM
RE: [C#] Write to MsgPlus Event Log - by Jedimark on 10-06-2005 at 08:48 PM
RE: [C#] Write to MsgPlus Event Log - by J-Thread on 10-07-2005 at 08:08 AM
RE: [C#] Write to MsgPlus Event Log - by Jedimark on 10-07-2005 at 04:03 PM
RE: [C#] Write to MsgPlus Event Log - by J-Thread on 10-07-2005 at 06:30 PM


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