Has MPTray been updated for Win7? (1 Viewer)

reverson1

Portal Pro
May 23, 2006
88
4
Williamsburg,VA
Home Country
United States of America United States of America
I'm not sure if I posted this in the right place or not...


I've searched the forums the past couple of days and I'm having difficulty finding out whether or not MPTray has been updated for Win7?

If it has, could someone please point me in the right direction to download both it and the source code for it?

Thanks
Richard
 

reverson1

Portal Pro
May 23, 2006
88
4
Williamsburg,VA
Home Country
United States of America United States of America
Thanks for the link.

I downloaded the file, but when I run it the tray icon never appears but the process is running in task manager.

Also, when I ran the source for mptray (which is very similar to the original code) the remote doesn't function at all. The devicearrival, deviceremoval, and onkeydown never get fired.



Is anyone here using mptray/mptraymod successfully on Windows 7?

Thanks for the help though...
Richard
 

reverson1

Portal Pro
May 23, 2006
88
4
Williamsburg,VA
Home Country
United States of America United States of America
Thank you SpudR. I'll check it out in the morning. As a quick test I ran the exe and the icon showed up in the systray - so that is progress hopefully it will work with the remote!
 

etheesdad

Retired Team Member
  • Premium Supporter
  • November 8, 2008
    831
    139
    Adelaide
    It isnt designed to have a tray icon, so you're not missing anything there.

    Ronlise is a bit of an MPTray guru. You could try PMing him.

    If you get it working, please post the fix, so others can make use of it.
     

    reverson1

    Portal Pro
    May 23, 2006
    88
    4
    Williamsburg,VA
    Home Country
    United States of America United States of America
    I found a couple things (sorry about the lack of formatting - I didn't see any options to format the code...)

    1. I needed to add my device path to the list of paths that are checked in Device.cs

    (deviceInterfaceDetailData.DevicePath.IndexOf("hid#irdevicev2") != -1)) //Microsoft RC6


    2. In OnReadComplete in Remote.cs the code for _deviceStream.EndRead(AsyncResult) has changed from 13 to 25 and the index of the key has changed from 5 to 9.


    void OnReadComplete(IAsyncResult asyncResult)
    {
    try
    {
    int er = _deviceStream.EndRead(asyncResult);
    if ((er == 13 || er == 25) && _deviceBuffer[1] == 1)
    {
    if (_deviceBuffer[5] == (int)_doubleClickButton && Environment.TickCount - _doubleClickTick <= _doubleClickTime)
    {
    if (DoubleClick != null)
    DoubleClick(this, new RemoteEventArgs(_doubleClickButton));
    }
    else
    {
    if (er == 13)
    {
    _doubleClickButton = (RemoteButton)_deviceBuffer[5];
    }
    else
    {
    _doubleClickButton = (RemoteButton)_deviceBuffer[9];
    }
    _doubleClickTick = Environment.TickCount;

    if (Click != null)
    Click(this, new RemoteEventArgs(_doubleClickButton));
    }
    }

    // begin another asynchronous read from the device
    _deviceStream.BeginRead(_deviceBuffer, 0, _deviceBuffer.Length, new AsyncCallback(OnReadComplete), null);
    }
    catch { }
    }

    HTH
     

    Users who are viewing this thread

    Top Bottom