<legend id='0MZzI'><style id='0MZzI'><dir id='0MZzI'><q id='0MZzI'></q></dir></style></legend>

      <i id='0MZzI'><tr id='0MZzI'><dt id='0MZzI'><q id='0MZzI'><span id='0MZzI'><b id='0MZzI'><form id='0MZzI'><ins id='0MZzI'></ins><ul id='0MZzI'></ul><sub id='0MZzI'></sub></form><legend id='0MZzI'></legend><bdo id='0MZzI'><pre id='0MZzI'><center id='0MZzI'></center></pre></bdo></b><th id='0MZzI'></th></span></q></dt></tr></i><div id='0MZzI'><tfoot id='0MZzI'></tfoot><dl id='0MZzI'><fieldset id='0MZzI'></fieldset></dl></div>
      <tfoot id='0MZzI'></tfoot>
        <bdo id='0MZzI'></bdo><ul id='0MZzI'></ul>

    1. <small id='0MZzI'></small><noframes id='0MZzI'>

        为什么 RequestAdditionalTime() 方法在 Vista/7 中重新启动时不起作用?

        Why doesn#39;t the RequestAdditionalTime() method work on restart in Vista/7?(为什么 RequestAdditionalTime() 方法在 Vista/7 中重新启动时不起作用?)
        <tfoot id='Ielxv'></tfoot>

          <tbody id='Ielxv'></tbody>
            <bdo id='Ielxv'></bdo><ul id='Ielxv'></ul>

            <small id='Ielxv'></small><noframes id='Ielxv'>

            <legend id='Ielxv'><style id='Ielxv'><dir id='Ielxv'><q id='Ielxv'></q></dir></style></legend>

            <i id='Ielxv'><tr id='Ielxv'><dt id='Ielxv'><q id='Ielxv'><span id='Ielxv'><b id='Ielxv'><form id='Ielxv'><ins id='Ielxv'></ins><ul id='Ielxv'></ul><sub id='Ielxv'></sub></form><legend id='Ielxv'></legend><bdo id='Ielxv'><pre id='Ielxv'><center id='Ielxv'></center></pre></bdo></b><th id='Ielxv'></th></span></q></dt></tr></i><div id='Ielxv'><tfoot id='Ielxv'></tfoot><dl id='Ielxv'><fieldset id='Ielxv'></fieldset></dl></div>

                • 本文介绍了为什么 RequestAdditionalTime() 方法在 Vista/7 中重新启动时不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我一直在对我用 C# .Net 3.5 编写的 Windows 服务进行一些广泛的测试.当我重新启动或关闭计算机时,我无法让 Windows 给我足够的时间让我的服务正常关闭,即使我正在调用 RequestAdditionalTime() 方法,该方法应该更新 SCM 并保持我的服务运行.但是,如果我手动停止服务,我的代码可以正常工作.在决定在 Windows Xp 中测试代码后,我主要在 Windows Vista 和 Windows 7 中测试此代码,一切正常.有谁知道为什么这个调用在 Vista/7 中不起作用?我想我需要某种许可来防止系统关闭,这是我在 Xp 中默认获得的,但在 Vista/7 中没有.

                  I have been doing some extensive testing of a Windows Service I have been writing in C# .Net 3.5. I am having trouble getting Windows to give me enough time for my service to shutdown properly when I restart or shutdown the computer even though I am invoking the RequestAdditionalTime() method which should update the SCM and keep my service running. My code works properly if I manually stop the service however. I have primarily been testing this code in Windows Vista and Windows 7, upon deciding to test the code in Windows Xp everything worked perfectly. Does anyone know why this call does not work in Vista/7? I am thinking I need some kind of permission to keep the system from shutting down that I get by default in Xp but not in Vista/7.

                  推荐答案

                  如果系统没有关闭,你的服务可以请求额外的时间并且你的进程不会被杀死.

                  If the system isn't shutting down, your service can request additional time and your process will not get killed.

                  如果系统正在关闭,您的服务必须关闭.您甚至没有获得服务通常获得的正常 30 秒.关机比以前更有力了.

                  If the system is shutting down, your service has to shut down. You don't even get the normal 30 seconds that a service normally gets. Shutdown is more forceful than it used to be.

                  这篇关于为什么 RequestAdditionalTime() 方法在 Vista/7 中重新启动时不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Adding and removing users from Active Directory groups in .NET(在 .NET 中的 Active Directory 组中添加和删除用户)
                  set equality in linq(在 linq 中设置相等)
                  HashSet conversion to List(HashSet 转换为 List)
                  How to set timeout for webBrowser navigate event(如何为 webBrowser 导航事件设置超时)
                  Test whether two IEnumerablelt;Tgt; have the same values with the same frequencies(测试两个IEnumerablelt;Tgt;具有相同频率的相同值)
                  How do you determine if two HashSets are equal (by value, not by reference)?(您如何确定两个 HashSet 是否相等(按值,而不是按引用)?)
                    <tbody id='s0drX'></tbody>

                • <tfoot id='s0drX'></tfoot><legend id='s0drX'><style id='s0drX'><dir id='s0drX'><q id='s0drX'></q></dir></style></legend>

                        1. <small id='s0drX'></small><noframes id='s0drX'>

                            <bdo id='s0drX'></bdo><ul id='s0drX'></ul>
                            <i id='s0drX'><tr id='s0drX'><dt id='s0drX'><q id='s0drX'><span id='s0drX'><b id='s0drX'><form id='s0drX'><ins id='s0drX'></ins><ul id='s0drX'></ul><sub id='s0drX'></sub></form><legend id='s0drX'></legend><bdo id='s0drX'><pre id='s0drX'><center id='s0drX'></center></pre></bdo></b><th id='s0drX'></th></span></q></dt></tr></i><div id='s0drX'><tfoot id='s0drX'></tfoot><dl id='s0drX'><fieldset id='s0drX'></fieldset></dl></div>