title: How to convert char that represents hex value to DWORD?
body: <p>I have a method <code>WriteValue</code> that writes a <code>DWORD</code> value to the registry:</p>
  
  <pre><code>const char *WriteValue(char* searchHandleId)
  {
   //...
   DWORD value =  atoi(searchHandleId); // wrong!!!
   LONG result_write = RegSetValueEx(
                                    hkey,
                                   "hwnd_to_track",
                                    0,
                                    REG_DWORD,
                                    (const BYTE*)&amp;value,
                                     sizeof(value)
                                     );
   //..
  } 
  </code></pre>
  
  <p>The problem is that <code>searchHandleId</code> represents a hexadecimal number:</p>
  
  <pre><code> printf( "Found .... hWnd: (%s)\n", searchHandleId);   
  </code></pre>
  
  <p>Output: <code>Found .... hWnd: (002F1CE0)</code></p>
  
  <p>How to convert <code>searchHandleId</code> to <code>value</code> (DWORD value, in my case)?</p>