Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Using VS2005 to ship legacy code for XP and Windows 2000.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Alan Klietz  
View profile  
 More options Feb 13 2006, 7:05 pm
Newsgroups: microsoft.public.vc.mfc
From: "Alan Klietz" <al...@newsgroup.nospam>
Date: Mon, 13 Feb 2006 18:05:42 -0600
Local: Mon, Feb 13 2006 7:05 pm
Subject: Using VS2005 to ship legacy code for XP and Windows 2000.
If you want to publish a Windows application that runs on Windows 2000 or
Windows XP, using the latest compiler (Visual Studio 2005), you can do so.
Without requiring that you ship megabytes of code from the VS2005 runtime
libraries (MSVCRT80.DLL and MFC80.DLL).

Follow these steps:

1) Install the Windows Server 2003 SP1 Platform SDK (April 2005 Edition).
The April 2005 PSDK bundles the VS 2005 compiler (version 14.0) and its
associated include headers and libraries.  With VC6 installed it allows you
to link VC6 compatible apps for 32-bit applications.
2) You won't be able to use the 64-bit compiler bundled with the April 2005
PSDK on your 32-bit apps.  But (and this is the key trick) you can use
Visual Studio 2005's compiler with the April 2005 PSDK.  Just point Visual
Studio 2005's INCLUDE folders at the PSSDK folders: include\mfc,
include\atl, and include\crt.   Point the LIB folder to your original VC6
installation.  Now you can compile with Visual Studio 2005 and link
correctly with MFC42.LIB and MSVCRT.LIB while enjoying all the new IDE
goodies and security checking of Visual Studio 2005.

You still need the VS 2005 version of RunTmChk.lib and sehprolg.obj in order
to write the __security_check_cookie stub.  (See Matt Pietrek's postings for
more info on this topic.)

To fix the remaining link errors with CxxFrameHandler3 and alloca use the
following:

   .386
   .model flat
   ;
   ; vc8-to-vc6 bridge assembly code.
   ;
   ; This module patches up gaps in order to a build a bridge to connect our
code
   ; compiled with the VC8 compiler and with the code in the VC6 runtime
library.
   ;
   ; Trampoline from ___CxxFrameHandler3 --> ___CxxFrameHandler
   ;
   ; ___CxxFrameHandler[n] is called for try/catch blocks (C++)
   ;
   ; See "How a C++ compiler implements exception handling"
   ; http://www.codeproject.com/cpp/exceptionhandler.asp

   ;

   ; MSVCRT.DLL
   extrn __imp____CxxFrameHandler:dword  ; external memory addr

public  ___CxxFrameHandler3

___CxxFrameHandler3 proc near

   ; Jump indirect: Jumps to (*__imp__CxxFrameHandler)
   jmp  __imp____CxxFrameHandler  ; Trampoline bounce

___CxxFrameHandler3 endp

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

   extrn __chkstk:abs   ; Absolute external constant

   public __alloca_probe_16
__alloca_probe_16 proc near

arg_0  = dword ptr  8
   push    ecx
   lea     ecx, [esp+arg_0]
   sub     ecx, eax
   and     ecx, 0Fh
   add     eax, ecx
   sbb     ecx, ecx
   or      eax, ecx
   pop     ecx
   jmp     near ptr __chkstk

__alloca_probe_16 endp

   public __alloca_probe_8
__alloca_probe_8 proc near
arg_0           = dword ptr  8
   push    ecx
   lea     ecx, [esp+arg_0]
   sub     ecx, eax
   and     ecx, 7
   add     eax, ecx
   sbb     ecx, ecx
   or      eax, ecx
   pop     ecx
   jmp     near ptr __chkstk

__alloca_probe_8 endp

-- Alan Klietz (alank at NOSPAM algintech dot com)


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
"TerryFei"  
View profile  
 More options Feb 13 2006, 9:56 pm
Newsgroups: microsoft.public.vc.mfc
From: v-ter...@online.microsoft.com ("TerryFei")
Date: Tue, 14 Feb 2006 02:56:53 GMT
Local: Mon, Feb 13 2006 9:56 pm
Subject: RE: Using VS2005 to ship legacy code for XP and Windows 2000.
Hi Alan,
Thanks for your sharing knowledge. It will benefit others in the newsgroup
facing this issue.

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google