CopyMinder Knowledge Base

Browse by Category:
Lookup Error Number:

Glossary   |   Contact Us

Performing a protection check results in a Windows error message

Views: 3032
Rating: -30
Rate It:

Under newer versions of Windows such as Vista and Server 2008 your CopyMinder protected program may fail to perform a protection check possibly resulting in a Windows error dialog saying "This program has encountered an error" or "This program has stopped working" or similar.  This is not a problem with release 47 of the .cm file onwards.

These versions of Windows contain features that conflict with the security and protection implemented by CopyMinder. Combined with some new options enabled on your program by Visual Studio 2005 and newer, these features can actually stop your program from working.

1) Upgrade
Ensure that you have not requested .cm upgrades to be restricted to a release prior to 47, re-protect your program and send the customer a new .cm file.

2) System-wide Data Execution Prevention (DEP)
DEP is a security feature of Windows that can be enabled for essential Windows programs only or for all programs. By default, Vista has DEP enabled only for essential Windows programs, but Server 2008 has DEP enabled for all programs. If your DEP setting is on for all programs then you have two choices, you can either add your program to the list of exceptions (i.e., programs for which Windows will disable DEP) or change it to apply only to essential Windows programs (see the image below for steps on getting to the DEP settings window).

NXCOMPAT is an option enabled on your program by Visual Studio 2005 or newer that tells Windows to enable DEP for this program. If the system-wide DEP setting is enabled for all programs then this option is redundant. If the system-wide DEP setting is enabled only for essential Windows programs then having NXCOMPAT enabled in your exe will override the system-wide setting. NXCOMPAT can be turned off within Visual Studio by going to Project Properties > Linker options > Advanced, and then disabling the Data Execution Prevention option. If you do not have access to the Linker options then the following command added to your Post-Build Events will disable NXCOMPAT:
editbin /NXCOMPAT:NO $(TargetPath)
where $(TargetPath) is a macro provided by Visual Studio which contains the full path the program built by the Project.

4) Dynamic Base Address
Newer versions of Visual Studio enable an option in your program that tells Windows to randomize the location in memory at which it loads your executable. This can cause problems for Shell Protected programs and should be disabled either in the Linker options (the setting is called "Randomized Base Address") or with the following Post-Build Event:
editbin /DYNAMICBASE:NO $(TargetPath)
Note: having DYNAMICBASE enabled is only a problem for Win32 (i.e., non-.NET programs) Shell Protected executables.

DEP Settings (click for larger version)

Others in this Category
articleI don't seem to have a CD-ROM with the CopyMinder software on it
articleMy computer hangs when installing the CopyMinder SDK
articleHow do I create a Trial Only installation?
articleHow do I find the .cm and .cm.log files?
articleWhy is a Product Key not in a Report I have produced?

Microcosm Ltd.

Valid XHTML 1.0    Valid CSS 2.0