title: better understanding of extern "C" functions
body: <p>I am just trying to further understand extern C functions. </p>
  
  <p>According to my knowledge, an extern C function is always a function you are trying call from an application that has already been compiled. Either a executable, static or dynamic library.</p>
  
  <pre><code>extern "C" 
  {
     HRESULT CreateDevice();
     typedef HRESULT (*CREATEDEVICE)();
  
     HRESULT ReleaseDevice();
     typedef HRESULT (*RELEASEDEVICE)();
  }
  </code></pre>
  
  <p>So my question is...</p>
  
  <p>Is my understanding correct ??</p>
  
  <p>Does it always have to be a C function pointer ??'</p>
  
  <p>Why must you use a typedef for each function ??</p>
  
  <p>I presume that when you use the GetProcAddress(). You are allocating memory on that particulars applications HEAP and not the one you are calling it from. Therefore you must release it from that heap as well ??</p>