views:

14

answers:

0

Hello all,

As the title says, this question is about targeting an older version of the C run time in my mixed-mode C++ dll. I realize that the proper way to do this would be use an older version of Visual c++ but for whatever reason, this is the correct route for us. The dll is built in Visual Studio 2008.

  1. Is there a version of the CRT that comes with Windows XP (we support windows OS starting at XP)
  2. How do I force Visual C++ to target above CRT if this is possible.

What I have done so far is tell visual studio to not generate a manifest file. I then go into the manifest file that had already been generated and changed this line:

<assemblyIdentity type='win32' 
        name='Microsoft.VC90.CRT' 
        version='9.0.21022.8' 
        processorArchitecture='x86' 
        publicKeyToken='1fc8b3b9a1e18e3b' />

to this line:

<assemblyIdentity type='win32' 
        name='Microsoft.VC80.CRT' 
        version='8.0.50727.42'    
        processorArchitecture='x86' 
        publicKeyToken='1fc8b3b9a1e18e3b' />

I have changed the version to various 8.0.* versions and every time I compile it and look at the DLL manifest in ILDasm it has this line:

.assembly extern Microsoft.VisualC
{
  .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )               // .?_....:
  .hash = (26 11 B8 F3 F4 2E 76 C0 BC 61 C9 79 5A 27 AD 34   // &.....v..a.yZ'.4
           94 EB 12 F9 ) 
  .ver 8:0:0:0
}

It has no buildno or revision... dont think thats really a problem but noteworthy. The error we get when trying to reference the compiled DLL in a VB.net (.net 2.0) project is:

The specified module could not be found. (Exception from HRESULT: 0x8007007E)