简体   繁体   中英

How does Win8 classify a process as a “Background Process”? My app works in Win7 but shows no UI in Win8

My fairly normal MFC-based Windows application works fine on Windows 7. But when I run it in Windows 8, no UI appears. At first I thought it somehow wasn't launching properly, but eventually realized that if I bring up the Task Manager, it shows that my application is running but it's listed under the "Background processes" section.

What heuristics is Windows 8 running on a process to decide it is a "background process"? Or is there something I can do--perhaps in the application manifest--to explicitly label my application as a foreground process?

I have tried running in Win7 and XP compatibility modes, to no avail. I have tried several Win8 machines, all give the same result.

For what it's worth, this app is compiled with Visual Studio 2003 and I do not have the option of using a newer compiler.

I have googled things like "win8 background process" but all I'm getting are people who want to create a background process. Some of the answers suggest that a background process has to be registered using the application manifest, but I double-checked my manifest and it definitely has nothing in it about being a background process.

Here's my manifest, in case you can see something off in it:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
<assemblyIdentity 
    version="1.0.0.0" 
    processorArchitecture="X86" 
    name="MyProductName"
    type="win32" 
/> 
    <description>My Product Description</description> 
    <dependency> 
        <dependentAssembly> 
            <assemblyIdentity 
                type="win32" 
                name="Microsoft.Windows.Common-Controls" 
                version="6.0.0.0" 
                processorArchitecture="X86" 
                publicKeyToken="6595b64144ccf1df" 
                language="*" 
            /> 
        </dependentAssembly> 
    </dependency> 
    <asmv3:trustInfo xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
        <asmv3:security>
            <asmv3:requestedPrivileges>
                <asmv3:requestedExecutionLevel level="asInvoker" uiAccess="false" />
            </asmv3:requestedPrivileges>
        </asmv3:security>
    </asmv3:trustInfo>
</assembly>

I will be opening a support incident with Microsoft to get their help if I can't find an answer here. If it gets to that point, I'll certainly update this question with what I find.

I'm developing Windows 8 applications but not much knowledge of MFC development. so based on my knowledge MFC development is more similer to Silverlight development but Windows 8 development is more different than MFC development platform.

by the way, " Classification of Background Process in Win 8 ":

The Process of application which is in suspend mode, that means the application is running but not showing any UI due to Desktop mode. to clarify my self on this point I checked once more by creating a tread in win 8 by XAML & C#, and made that thread as in suspend mode, only at that time that process showing as background process in task manager.

moreover that "Specifically for Windows 8 only" :

The process of any app shows as background process when Provided Resources to the app will decreases or will d-allocate those resources but still application is loaded and running...

This feature of Windows 8 is known as "Auto Resource allocation"...

sorry if you not find your answer here but i think this can help you to know "Which process is classify as Background Process in Win 8"

就我而言,这纯粹是推测,因为我找不到任何文档,但是我怀疑MFC中的某些功能失败了,并且缺少有效的UI是任务管理器将您的应用分类为后台进程的原因,因为用户将无法与其进行交互。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM