Jeff Sanders Technical Blog

I am a Microsoft employee that has worked on all aspects of the Web Stack for a long time. I hope these blogs are useful to you! Use this information at your own risk.


<< Go Back

Atl Library And Windows Store Apps

- 27 Dec 2012

Just a quick post in case you run up against this issue.

You can use a subset of ATL Library code in your Windows Store app.  You may run into errors with validation when compiling or when running the Windows App Certification Kit (WACK) tool.

If you include CComCriticalSection in your Windows Store app code and then run the WACK tool you will get these errors:

Error Found: The supported APIs test detected the following errors:

This is caused by a bug in the current ATL Library.  The workaround is to add this code to your project which will implement the correct code (add it to any of your CPP files):

#if (_ATL_NTDDI_MIN >= NTDDI_VISTA) namespace ATL { BOOL _AtlInitializeCriticalSectionEx(__out LPCRITICAL_SECTION lpCriticalSection, __in DWORD dwSpinCount, __in DWORD Flags)
{
     return InitializeCriticalSectionEx(lpCriticalSection, dwSpinCount, Flags); 
}
}
#endif

Let me know if this helped you out!

-Jeff

<< Go Back