Translator and PowerDVD 8 (1 Viewer)

sonix1977nl

Portal Member
June 10, 2008
24
8
Hi there,

I use the Translator of the IR Server Suite to map the buttons on my remote to certain key combinations, so that I can control PowerDVD 8 Ultra with my remote. Unfortunately, as soon as I start a blu-ray disc, the translator stops sending key combinations to the PowerDVD process.

I have been doing some digging in the code and came up with the following reason.

- When a key press (on the remote) event is sent to Translator, it gets the foreground window.
- Then it gets the PID that belongs to that window.
- Using the .NET Process class it gets the process by that PID.
- It uses the MainModule property on the Process class to get the full executable path of that process.
- It then maps that full executable path to find the appropriate mapping to use.

The problem with this implementation is that Vista has introduced something called protected processes. As soon as PowerDVD starts playing a blu-ray disc, it converts itself to a protected process. It is impossible to get any module information on a protected process, so the Process.MainModule property will fail horribly. Thus it can't get the full executable path. And without that, Translator can't find the appropriate mapping to use.

Getting the process name on a protected process is still possible. So would it be possible to refactor this, so that you can specify the process name instead of the full executable path. I guess the protected process shit is the reason why the PowerScheduler plugin in TV Server lets you specify the process names of process which should prevent putting the PC to sleep.

PS: I do love the flexibility of the IR Server Suite. Good work. :)
 

sonix1977nl

Portal Member
June 10, 2008
24
8
If the author of this great tool is interested I can submit a change to the Translator application. My fix does two things:

- Instead of getting the full path of the active executable, it gets the process name instead (filename, without path and without extension).
- Search the program settings by stripping the path and extension from the filename in the program settings.

Now I can control PowerDVD 8 while playing a Blu-ray disc. :)
 

sonix1977nl

Portal Member
June 10, 2008
24
8
Sorry for the late reply. But this is the patch file

Index: Program.cs
===================================================================
--- Program.cs (revision 2610)
+++ Program.cs (working copy)
@@ -868,11 +868,11 @@
return null;
}

- string fileName = Path.GetFileName(process.MainModule.FileName);
+ string processName = process.ProcessName;

foreach (ProgramSettings progSettings in Config.Programs)
{
- if (fileName.Equals(Path.GetFileName(progSettings.FileName), StringComparison.OrdinalIgnoreCase))
+ if (processName.Equals(Path.GetFileNameWithoutExtension(progSettings.FileName), StringComparison.OrdinalIgnoreCase))
{
return progSettings;
}
 

midgar

MP Donator
  • Premium Supporter
  • January 4, 2007
    63
    3
    Lucca, Tuscany
    Home Country
    Italy Italy
    unable to control one game with traslator

    Hi there, I've problem to control via Traslator one game (millionaire) and maybe it's due to Vista's protected process, anyone know if this patch is also included on lastest release ? I've tried it but whitout success.
    Thank you
     

    Petzku

    New Member
    November 6, 2007
    3
    0
    Home Country
    Finland Finland
    I am having exact the same problem with the newest build of IRSS/Translator. So it seems that the patch has not been applied to the "official" builds of the suite. Are there any downloads for versions of translator with the patch applied? Or is there any other way to solve this problem?
     

    Users who are viewing this thread

    Top Bottom