The method of running the program in the low version XP and 2003 can be compiled with VC2010 or above version

Source: Internet
Author: User

2013-09-17 Anonymous Source: The site is organized browse: 2001 Comments: 1

It's been a long time since then, vc2010. exe or DLL compiled from the above version will always refer to Kernel32.dll Encodepointer and Decodepointer Two APIs, these two APIs are not found on XP SP2 the following version. Although this version of the user less, but there is always someone in use, Microsoft This is not considered this low-end use, helpless, I used 3 methods, recorded as follows.

1, using the vc2008 Library, with 2010 of the compiler. This method needs to find a copy of the vc2008 library, and in the project settings, the default reference path is changed to 2008 Library path is good.

2, install a vc2008 version, and then in 2010 of the project settings set the platform toolset as "V90", this way compatibility is best, but not with the latest C + + syntax, such as auto and so on

3, this is just discovered, for a long time with the above two methods, very inconvenient, especially the second kind, need to install two vs, painful, today determined to find a simple way, so in the StackOverflow on the search of this article

Http://stackoverflow.com/questio ... Udio-2008s-c-runtim

This method is relatively simple, with FASM the following code compiled into an obj, and then link into a lib, and finally in the VC project first reference this lib can be

1234567891011121314 use32 format Ms Coff  section data public [email protected] [ Email protected] dd dummy  public [ Email protected] [email protected] dd dummy   section code dummy: mov eax, [esp+4] RETN 4

This method is much simpler, vs2010 and vs2012 are common, no longer have to carry a huge vc2008 library, and can use the latest C + + syntax

Additional methods:

First generate a Crack.asm file with the following content:

123456789101112131415 .model flat  .data [email protected" dd dummy [email protected] dd dummy Code class= "CPP Plain" >externdef [email protected]: dword externdef [email protected]: dword  .code dummy proc mov eax, [esp+4] ret 4 dummy ENDP   end

Then enter the VS2010 command line mode, be sure to enter the VS2010 command line mode, cannot simply execute the cmd, nonsense less say, continue, execute the following command to compile Crack.asm:
Ml-c crack.asm
Get crack.obj after compiling

The third step is to add the resulting crack.obj to a project that needs to support Windows 2000 and add it directly without additional configuration. After compiling with depends to look at the dependence of kernel32, found that there is no encodepointer and decodepointer dependence.

If you are not accustomed to using obj files, you can also use the following command to compile obj into a lib file:
Lib Crack.obj
Add the resulting Crack.lib file to your project, but you must ensure that the link order precedes kernel32.lib.

If the runtime appears not to be a legitimate WIN32 program, note the following two places:
1. The _win32_winnt value in the Targetver.h file, VS2010 default to the highest version of the SDK, needs to be manually changed to the desired version:
#define _WIN32_WINNT 0x0500
#include <SDKDDKVer.h>
2. Minimum Required version, this setting affects the version information in the PE file header, the VS2010 default setting is 5.1 and needs to be manually changed to the desired version:
For Win2000 of 5.0

The method of running the program in the low version XP and 2003 can be compiled with VC2010 or above version

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.