Application Verifier Locks 0x201 Active Critical Section

Suppose you are trying to get your application Vista Certified or OEM Ready. You test your application with Application Verifier and you see this error in the log: “<avrf:logEntry Time=”2008-10-15 : 14:18:33“ LayerName=”Locks“ StopCode=”0x201“ Severity=”Error“>   <avrf:message>Unloading DLL containing an active critical section.</avrf:message>     Now what? From the log, this is difficult to debug….

2

Debugging and Symbols

Anytime you want to do anything in a debugger, you need symbols. Best thing you can do is set up an environment variable, so you’re done. Here are public Microsoft symbols. Yves has created a little cmd that you can use which I politely copy here since it is handy: SetX.exe /M _NT_SYMBOL_PATH "SRV*C:\Symbols\Private*\\Symbols\Symbols;SRV*C:\Symbols\Public*http://msdl.microsoft.com/download/symbols" And…

3

DllGetClassObject already defined

When you upgrade your project from VC2005 to VC2008 you might get these errors: mfcs90u.lib(oleexp.obj) : error LNK2005: _DllGetClassObject@12 already defined in d.objmfcs90u.lib(oleexp.obj) : error LNK2005: _DllCanUnloadNow@0 already defined in d.obj Strictly in release builds though. You can add “AFX_MANAGE_STATE(AfxGetStaticModuleState());” to the first line of InitInstance() in dllmain.cpp.  

1

Application Verifier Logs for a Service

If you have a service and have told AppVerifier to monitor it, you might wonder where the logs are and how you can see them. (Two separate questions). You can find the logs here “c:\windows\system32\config\systemprofile\appverifierlogs” (or the corresponding directory given the system drive and bitness of your application). Now if you want to see them…

1

OEM Ready Links

While I’m trying to find out how to fix the portals, here are some links to documents we frequently use. OEM Ready program: http://msdn.microsoft.com/en-us/windowsvista/cc315067.aspx There is a Manual for the tool, but it is not linked from anywhere as far as I can tell: http://go.microsoft.com/?linkid=9093231 Here is Jay’s video on Channel 9: https://channel9.msdn.com/posts/philpenn/The-Microsoft-OEM-Ready-Certification-Tool/   

1

Shared Components

If you need to install components that are shared between multiple applications, you want them to go to Common Files. I found a decent description in this doc: “Windows Vista Application Development Requirements for User Account Control Compatibility”.You should stay out of system32.

2

How Do I know if Windbg I actually took effect?

So you’re ready to test your application with Application Verifier. The OEM Ready and Certified for Windows Vista (CFWV) test documents specify you type Windbg –I from an elevated command prompt. So you add your application to Application Verifier, add the specific tests under basic and miscellaneous and start your app. You run through your…

1

How to Roll Back WinDbg –I

For OEM Ready tests (and for Certified for Windows Vista) one of the requirements is to set up an interactive debugger. The documentation specifies Windbg since it allows you to do use extensions such as “!analyze –v” which will give you a ton of information. One question that then comes up is “How do get…

1

Where is my Session 0 notification?

Today I was working on an OEM Ready application. It is basically a subset of the Certified for Windows Vista program. Application Verifier is used to test reliability (heap overruns, handle usage, etc.). The test steps outline that you need to set up an interactive debugger. You will pass the test if you never see…

0

HighestAvailable and requiresAdministrator when you’re neither Standard User nor Administrator

There is something between standard users and administrators. In UAC discussions we limit ourselves often times to members of the administrators group who get the filtered token and the full token when they log on. But what if you’re a member of – say – Network Configuration operators. In that case you’re not a standard…

1