Login  
Search All Forums
Dart Home | PowerTCP Web Enterprise for ActiveX | Custom Development Reply | PowerTCP Web Enterprise for ActiveX Topics | Forums   
AuthorForum: PowerTCP Web Enterprise for ActiveX
Topic: Access violation error when post.
smith

From: Stellenbosch, South Africa
Posts: 1
Member Since: 10/11/11
posted October 11, 2011 8:19 AM

Hi

I am using Microsoft Visual Studio 2010 on Windows 7 platform.
I have downloaded the latest PowerTCP WebEnterprise_ActiveX_Trial version 1.8.3.
I have compiled and run the PostDemo application in Samples\WebASP\Vc6 folder.

If I run the application and select post, the application throws an access violation error in the following code:

inline HRESULT IWebASP::Post ( ) {
  HRESULT _hr = raw_Post(); // throws access violation.
  if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
  return _hr;
}

Does anyone know what the problem is?
Nick B (Admin)

From: Utica, NY USA
Posts: 619
Member Since: 05/25/10

Extra Support Options
Custom Application Development

posted October 11, 2011 10:35 AM

Hello,

This is most likely an issue with DEP.

DEP may either be disabled on a per-application basis, or system-wide. To disable DEP on a per-application basis, clear the IMAGE_DLLCHARACTERISTICS_NX_COMPAT flag for your executable:

editbin.exe /NXCOMPAT:NO <your binary>
or
"C:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat" editbin.exe /NXCOMPAT:NO "$(TargetPath)"

If you're using Visual Studio, you can add a post-build step to your executable's project. You'll need to setup the environment so that EDITBIN's dependencies can be resolved. When I'm using native code as part of my app, the post-build step looks like this:

call $(DevEnvDir)..\tools\vsvars32.bat
editbin.exe /NXCOMPAT:NO $(TargetPath)

How To Disable DEP in Windows XP

  Navigate to Control Panel>System>Advanced Tab>Startup and Recovery>Settings
  Click on edit button
  Notepad will appear, editing boot.ini
  Edit the entry for your OS so that '/noexecute=optin' is set to '/noexecute=AlwaysOff'
  Restart your computer to integrate the change.

How To Disable DEP in Windows 7

  Launch a command console 'As Administrator'
  Execute:

bcdedit.exe /set {current} nx AlwaysOff

How To set DEP back to default in Windows 7:

  Launch a command console 'As Administrator'
  Execute:

bcdedit.exe /set {current} nx OptIn

How To Change DEP settings for a Specific Program
Windows 7

  Navigate to Control Panel>System>Advanced System Settings>Advanced Tab>Performance>Settings>Data Execution Prevention Tab
  Edit Settings as Desired

Windows XP

  Navigate to Control Panel>System>Advanced Tab>Performance>Settings>Data Execution Prevention Tab
  Edit Settings as Desired

How To discover current DEP setting in Windows 7 or XP:

  Launch a command console 'As Administrator'
  Execute (without quotes):

wmic OS Get DataExecutionPrevention_SupportPolicy

DEP setting enumeration

  0 = AlwaysOff – DEP is disabled for all processes
  1 = AlwaysOn – DEP is enabled for all processes
  2 = OptIn – DEP is enabled for Windows system components and services (this is the default setting)
  3 = OptOut – DEP is enabled for all processes except for those Administrators identified

------
-Non-current subscribers must contact sales@dart.com to update subscription and receive continued support as needed.
------

Reply | PowerTCP Web Enterprise for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX