title: How to set entry point of a process created from CreateProcess
body: <p>I am using CreateProcess to invoke     <code>cl</code>     to compile and link another C++ program (<code>TestProg.cxx</code>) into a DLL. I invoke <code>cl</code> with the following compilation options:</p>
  
  <pre><code>/Od /nologo /Fo /RTC /w /Zc /EHsc /I\INCLUDE /I\LIB /I\PATH TestProg.cxx /DLL
  </code></pre>
  
  <p>the call:</p>
  
  <pre><code>if ( CreateProcess(full path to cl.exe, compilation options, NULL,NULL,FALSE,0,       NULL,NULL,&amp;si,&amp;pi) ) 
  {
   //....
  }
  </code></pre>
  
  <p>Running the application from VS tools prompt, I got the following linkage error:</p>
  
  <pre><code>LINK : fatal error LNK1561: entry point must be defined
  </code></pre>
  
  <p>What am I doing wrong? 
  I searched the answer for the last 1/2 day at the web, but didn't find it. Using windows API is new to me.</p>
  
  <p>Thanks</p>