//Create object.
 public static void create_object()
 {
     PSI = new ProcessInformation();
     TMD = new TrackMetadata();
     notify = new Notify();
     notify.createGrowlObject();
 }
Beispiel #2
0
    //Constructor for NameChangeTracker
    public NameChangeTracker(ToastForm myForm)
    {
        NameChangeTracker.myForm = myForm;
        psi = new ProcessInformation();
        tmd = new TrackMetadata();
        notify = new Notify();
        //Console.WriteLine(psi.getSpotifyPID());

        // Listen for name change changes for spotify(check pid!=0).
        hWinEventHook = SetWinEventHook(0x0800c, 0x800c, IntPtr.Zero, procDelegate, Convert.ToUInt32(psi.getSpotifyPID()), 0, 0);
        // Listen for create window event across all processes/threads on current desktop.(check pid=0)
        hWinEventHook_start = SetWinEventHook(0x00008000, 0x00008000, IntPtr.Zero, procDelegate_start, 0, 0, 0);
    }