title: RunDll32 Problem on Win2k with Visual C++ 2008 Express Compiled DLL
body: <p>First off, I'm not a C++ programmer (but I am learning). I have finally managed to modify and compile some C++ source code using Visual C++ 2008 Express Edition. I've tried to get the same code compiled in the full version of Visual C++ 2003 without success (I get a wide variety of errors, but no luck).</p>
  
  <p>The problem is that everything is working fine using RunDll32 to call the DLL on Windows Vista, but when I try the same rundll32 call on Windows 2000, I get the following error:</p>
  
  <blockquote>
    <p>"Error loading mysampledll.dll"
    "The specified module could not be found."</p>
  </blockquote>
  
  <p>Of course, I've tried setting the full path, moving the file around, etc...but no luck. I guarantee that the file exists and has the correct permissions.</p>
  
  <p>I thought perhaps that there is something wrong with the manifest that is getting compiled along with the DLL in Vista. So I removed it using a resource editor, but then I get the same error in Vista and Win2k. Here's the manifest:</p>
  
  <pre><code>&lt;assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"&gt;
      &lt;trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"&gt;
      &lt;security&gt;
          &lt;requestedPrivileges&gt;
              &lt;requestedExecutionLevel level="requireAdministrator" uiAccess="false"&gt;&lt;/requestedExecutionLevel&gt;
          &lt;/requestedPrivileges&gt;
      &lt;/security&gt;
      &lt;/trustInfo&gt;
      &lt;dependency&gt;
          &lt;dependentAssembly&gt;
              &lt;assemblyIdentity type="win32" name="Microsoft.VC90.DebugCRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"&gt;&lt;/assemblyIdentity&gt;
          &lt;/dependentAssembly&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;dependentAssembly&gt;
              &lt;assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"&gt;&lt;/assemblyIdentity&gt;
      &lt;/dependentAssembly&gt;
      &lt;/dependency&gt;
  &lt;/assembly&gt;
  </code></pre>
  
  <p>Now, I assume that the problem is with Win2k not having the Microsoft.VC90.CRT installed, but why does my DLL have this dependency? I've set the "Common Language Runtime Support" to "No Common Language Runtime Support" in the project properties, so why does it still require the CLR? Is there a way to change the manifest to use an older Visual C++ runtime that is available by default in Win2k? Sorry for my ignorance in these matters, and thanks in advance for any help.</p>