title: Attempted to read or write protected memory from WindowsServer2008 + VS2010 + .NET4.0
body: <p><strong>My Dev-PC has the followings:</strong>
      WindowsServer2008 + VS2010 + .NET4.0 </p>
  
  <p><strong>My troble:</strong>
      <em>{"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."}</em></p>
  
  <p><strong>What have I done:</strong>
      I made one COM component, and made a wrapper for it with C++/CLI, then use C# to visit. In my C# code, the main thread initialize the COM environment, and several children threads to use the resources which have been allocated by the main thread. But if the main thread exit without Join to wait for the end of the children thread, I will encounter the problem which shows "Attempted to read or write protected memory. This is often an indication that other memory is corrupt". This happens even though I use try catch(...) to wrap where the exception was thrown. I really doubt why this happen...</p>