<p>I'm just starting up a new ATL/WTL project and I was wondering if the global _Module variable is still required? </p>

<p>Back a few years when I started working with WTL it was required (at least for ATL 3.0) that you define a global variable such as:</p>

<pre><code>CAppModule _Module;
</code></pre>

<p>To get ATL to work correctly. But recently I've read somewhere that this may not be required anymore (yet the wizard generated code still uses it). Also I did a search through the Visual C++ include directories and it only picked up _Module in a few places - most notably the ATL COM registry stuff.</p>

<p>So do I still need to define a global variable to use ATL these days?</p>

In the sample projects of the latest WTL version, this is still used.
In stdafx.h:
```
```
extern CAppModule _Module;
```
```
In implementation files:
```
```
CAppModule _Module;
```
```