title: GetEnvironmentVariableA() usage
body: <p>I am working on a C++ Console Application in Visual Studio 2012 on Windows 7 and  I want to get the values of some environment variables from within the application.<br>
  Here is what I've tried so far -:</p>
  
  <pre><code>int main()
  {
      char a[1000];
      int s=GetEnvironmentVariableA("HOME",a,1000);
  }  
  </code></pre>
  
  <p>However, I am getting the value of <code>s</code> to be 0, indicating that variable "HOME" does not exist.<br>
  Also, <code>getenv("HOME")</code> returns <code>NULL</code> too.<br>
  So, what is the correct procedure of doing this ?  </p>