StandbyWatcher - avoids standby while something is recorded on vista ::V1.1 released! (3 Viewers)

-Manfred-

Retired Team Member
  • Premium Supporter
  • May 15, 2007
    728
    343
    Home Country
    Finland Finland
    Sorry SilentExcept, that doesnt work in vista anymore... :(

    Microsoft has removed this possibility.

    MoPhat

    How about SystemEvents.PowerModeChanged

    I'm using it in Vista for checking if suspend is wanted and works OK. It should be much easier to handle it like this and then all remotes are supported.

    Just my 2cents
     

    peque

    Moderator - Spanish Forums
  • Premium Supporter
  • August 4, 2007
    861
    99
    Home Country
    Spain Spain
    that plugin/extension is only needed if you let the system go to suspend mode with your power button.

    under xp you can prevent the suspend mode while a recording is in progress, under vista microsoft has removed this functionality :mad:... why ever...

    greetz
    MoPhat
    So... Yo mean that entering suspend mode manually (power button) is different for the system that doing it automatically (timeout) or through Start->Suspend ?

    It's really curious all around standby options in Vista...
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    @peque

    No, what i mean is:

    under XP: TVserver records something, in PowerScheduler the options is set if a recording is in progress - the pc can not go to standby by pressing the power button > you have a complete recording if you press the power key on the pc or the remote or the menu :D

    under Vista: the same options are active, you press the power button...PC goes to standby > recording are only partially recorded :mad:

    The function where the programmer can avoid that the pc can go in to standby mode is removed under vista because (is documentet on MSDN) most users are worryd while he pressed the power button a programm had avoided the standby/shutdown etc...

    thats all, has nothing to do with the timeout for the suspend state.


    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------


    Sorry SilentExcept, that doesnt work in vista anymore... :(

    Microsoft has removed this possibility.

    MoPhat

    How about SystemEvents.PowerModeChanged

    I'm using it in Vista for checking if suspend is wanted and works OK. It should be much easier to handle it like this and then all remotes are supported.

    Just my 2cents


    can you avoid with this the suspend from the pc under vista???

    MS had removed the function for that and has enhanced the away mode for this reason - but is not the same like avoiding standby :(

    had you a working example (a winform) so i can check this if its works with mp und tvserver together?

    If this works i can change the code from StandbyWatcher for that :D

    thx
    MoPhat
     

    peque

    Moderator - Spanish Forums
  • Premium Supporter
  • August 4, 2007
    861
    99
    Home Country
    Spain Spain
    Thanks for your explanation MoPhat. I understand.

    bye!
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    MoPhat
    just want to ask if you have still this solution working... or if there is any update - will try it in the next days.
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    Hi disiater123, for my purpose and my daily tv expirience it works great...wand for my wife...:D

    greetz
    MoPhat
     

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    I get the following wonderful error message :)

    Code:
    System.BadImageFormatException: Die Datei oder Assembly "TvControl, Version=0.9.3.42625, Culture=neutral, PublicKeyToken=null" oder eine Abhängigkeit davon wurde nicht gefunden. Es wurde versucht, eine Datei mit einem falschen Format zu laden.
    Dateiname: "TvControl, Version=0.9.3.42625, Culture=neutral, PublicKeyToken=null"
       bei StandbyWatcher.Form1.timer_ChechIfItsRecording_Tick(Object sender, EventArgs e)
       bei System.Windows.Forms.Timer.OnTick(EventArgs e)
       bei System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
       bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    WRN: Protokollierung der Assemblybindung ist AUS.
    Sie können die Protokollierung der Assemblybindungsfehler aktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) auf 1 festlegen.
    Hinweis: Die Protokollierung der Assemblybindungsfehler führt zu einer gewissen Leistungseinbuße.
    Sie können dieses Feature deaktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] entfernen.
    
    
    
    ************** Geladene Assemblys **************
    mscorlib
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.3074 (QFE.050727-3000).
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll.
    ----------------------------------------
    StandbyWatcher
        Assembly-Version: 1.0.0.0.
        Win32-Version: 1.0.0.0.
        CodeBase: file:///C:/Program%20Files%20(x86)/StandbyWatcher/StandbyWatcher.exe.
    ----------------------------------------
    System.Windows.Forms
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
    ----------------------------------------
    System
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll.
    ----------------------------------------
    System.Drawing
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
    ----------------------------------------
    MouseKeyboardLibrary
        Assembly-Version: 1.0.0.0.
        Win32-Version: 1.0.0.0.
        CodeBase: file:///C:/Program%20Files%20(x86)/StandbyWatcher/MouseKeyboardLibrary.DLL.
    ----------------------------------------
    System.Configuration
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.
    ----------------------------------------
    System.Xml
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.3074 (QFE.050727-3000).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll.
    ----------------------------------------
    mscorlib.resources
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.3074 (QFE.050727-3000).
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll.
    ----------------------------------------
    System.Windows.Forms.resources
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
    ----------------------------------------
    
    ************** JIT-Debuggen **************
    Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
    Konfigurationsdatei der Anwendung oder des Computers
    (machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
    Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.
    
    Zum Beispiel:
    
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    
    Wenn das JIT-Debuggen aktiviert ist, werden alle nicht behandelten
    Ausnahmen an den JIT-Debugger gesendet, der auf dem
    Computer registriert ist, und nicht in diesem Dialogfeld behandelt.
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    Hi disaster123, try this attached one...

    Unzip the content to folder on your drive.

    Replace Gentle.config with you own from the MP installation, or edit the settings:

    Code:
    <DefaultProvider name="SQLServer" connectionString="<PASSWORD>=storage;Persist Security Info=True;User ID=<USERNAME>;Initial Catalog=<DATABASENAME>;Data Source=<SERVER>;Connection Timeout=300;" />

    Start the SW, open it from the tray and change the settings... dont forget to tick the autostart behaviour ;)

    P.S.
    It should be on the same PC.

    good night
    MoPhat
     

    Attachments

    • StandbyWatcher.rar
      30.6 KB

    disaster123

    MP Donator
  • Premium Supporter
  • May 14, 2008
    3,558
    434
    Home Country
    Germany Germany
    doesn't help...

    Code:
    ************** Ausnahmetext **************
    System.BadImageFormatException: Die Datei oder Assembly "TvControl, Version=0.9.3.42625, Culture=neutral, PublicKeyToken=null" oder eine Abhängigkeit davon wurde nicht gefunden. Es wurde versucht, eine Datei mit einem falschen Format zu laden.
    Dateiname: "TvControl, Version=0.9.3.42625, Culture=neutral, PublicKeyToken=null"
       bei StandbyWatcher.Form1.timer_ChechIfItsRecording_Tick(Object sender, EventArgs e)
       bei System.Windows.Forms.Timer.OnTick(EventArgs e)
       bei System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
       bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    WRN: Protokollierung der Assemblybindung ist AUS.
    Sie können die Protokollierung der Assemblybindungsfehler aktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) auf 1 festlegen.
    Hinweis: Die Protokollierung der Assemblybindungsfehler führt zu einer gewissen Leistungseinbuße.
    Sie können dieses Feature deaktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] entfernen.
    
    
    
    ************** Geladene Assemblys **************
    mscorlib
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.3074 (QFE.050727-3000).
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll.
    ----------------------------------------
    StandbyWatcher
        Assembly-Version: 1.0.0.0.
        Win32-Version: 1.0.0.0.
        CodeBase: file:///C:/Program%20Files%20(x86)/StandbyWatcher/StandbyWatcher.exe.
    ----------------------------------------
    System.Windows.Forms
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
    ----------------------------------------
    System
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll.
    ----------------------------------------
    System.Drawing
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
    ----------------------------------------
    MouseKeyboardLibrary
        Assembly-Version: 1.0.0.0.
        Win32-Version: 1.0.0.0.
        CodeBase: file:///C:/Program%20Files%20(x86)/StandbyWatcher/MouseKeyboardLibrary.DLL.
    ----------------------------------------
    System.Configuration
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.
    ----------------------------------------
    System.Xml
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.3074 (QFE.050727-3000).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll.
    ----------------------------------------
    System.Windows.Forms.resources
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.3053 (netfxsp.050727-3000).
        CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
    ----------------------------------------
    mscorlib.resources
        Assembly-Version: 2.0.0.0.
        Win32-Version: 2.0.50727.3074 (QFE.050727-3000).
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll.
    ----------------------------------------
    
    ************** JIT-Debuggen **************
    Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
    Konfigurationsdatei der Anwendung oder des Computers
    (machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
    Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.
    
    Zum Beispiel:
    
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    
    Wenn das JIT-Debuggen aktiviert ist, werden alle nicht behandelten
    Ausnahmen an den JIT-Debugger gesendet, der auf dem
    Computer registriert ist, und nicht in diesem Dialogfeld behandelt.


    Should i simply compile it myself?
     

    MoPhat

    Retired Team Member
  • Premium Supporter
  • June 17, 2007
    816
    226
    Berg
    Home Country
    Switzerland Switzerland
    Try to overwrite the dll with your installed one:

    C:\Program Files\Team MediaPortal\MediaPortal TV Server\TvControl.dll

    ?

    MoPhat
     

    Users who are viewing this thread

    Top Bottom