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?