Click here to Skip to main content
15,884,838 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have an exception in windows 7, but no exception in windows xp.

MSIL
Problem signature:
  Problem Event Name: APPCRASH
  Application Name: AVKarMakerMUI.dealio._1.0.35.exe
  Application Version: 0.0.0.0
  Application Timestamp: 4bc06cda
  The name of the module with the error: StackHash_e98d
  Version of the module with the error: 0.0.0.0
  The time stamp module with the error: 00000000
  Exception Code: c0000005
  Exception Offset: 007ab16a
  OS Version: 6.1.7229.2.0.0.256.1
  Language Code: 1049
  Additional Information 1: e98d
  Additional Information 2: e98dfca8bcf81bc1740adb135579ad53
  Additional Information 3: 6eab
  Additional Information 4: 6eabdd9e0dc94904be3b39a1c0583635

Read our privacy statement on the Internet:
  http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0419

If the privacy statement on the Internet is not available, check with its local variants:
  C: \ Windows \ system32 \ ru-RU \ erofflps.txt


It is in effect module during registration effects for application.
Module writes value to registry using CRegKey. Could it be stack problems because of cdect and stdcall? What can it be?
Posted
Comments
Richard MacCutchan 16-Nov-10 10:16am    
In reply to your question below, I do not think VC6 handles manifest files. However if you use the "run as administrator" option when starting your program it should give the same result.

You need administrator privileges for writing to much of the registry. Check that your application has the correct settings in its manifest, or run as administrator.


Add the following to your manifest:
XML
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
  <security>
    <requestedPrivileges>
      <requestedExecutionLevel level='requireAdministrator' uiAccess='false' />
    </requestedPrivileges>
  </security>
</trustInfo>
 
Share this answer
 
v2
Comments
[no name] 16-Nov-10 3:33am    
What setting must be in application manifest? I had used administrator privileges - the same.
[no name] 16-Nov-10 8:43am    
Can manifest be used in Visual Studio 6?
For high security reason it is difficult to code on windows 7. the best link i have is
->[^]
download the setup of Windows7Training kit. it will definately help you.
If your application is COM app than search on Com elevation moniker or cocreateinstanceasadmin.
 
Share this answer
 
Comments
[no name] 16-Nov-10 3:40am    
Here is the code (something wrong with RegisterEffect):
void RegisterEffect( const TCHAR* pszName, const TCHAR* pszGroupName, BOOL bReg, const TCHAR* pszKey )
{
CRegKey reg_key;

CStdString path = pszKey;
if ( bReg )
{
if ( reg_key.Create( HKEY_LOCAL_MACHINE, path.c_str() ) != ERROR_SUCCESS )
{
::MessageBoxW( NULL, L"Register Error", L"Registration", MB_OK );
return;
}

reg_key.SetValue( pszName, V_EFFECT_KEY_NAME );
reg_key.SetValue( pszGroupName, V_EFFECT_KEY_GROUPNAME );
}
else
{
if ( reg_key.Open( HKEY_LOCAL_MACHINE, path.c_str() ) != ERROR_SUCCESS )
return;

reg_key.RecurseDeleteKey( _T("") );
}
}

void RegisterVideoEffect( RegDataEx* data, int nSize, BOOL bReg )
{
for ( long i = 0; i < nSize; i++ )
{
RegisterEffect( data[i].pszName, data[i].pszGroupName, bReg, GetRegPath( *data[i].id ).c_str() );
}
}

When application installed, it works good.
I used previous version to register. Previous version of effects are good at registration. It seems to me, that code changes were minimal: moving standard headers to stdafx.h.
[no name] 16-Nov-10 3:43am    
Exception in line CRegKey reg_key;. If i remove all from function RegisterEffect, then result is the same.
ShilpiP 16-Nov-10 4:10am    
Is your application is ATL COM based app??
[no name] 16-Nov-10 8:27am    
My application uses own com objects.
[no name] 16-Nov-10 8:40am    
The project contains more that 3000 editable files. In the folder are more then 15000 files. The engine consist of more than 100 projects. There are many projects based on ATL COM.
Problem solved after replacing usage of CRegKey with following code

if ( bReg )
{
HKEY hKey = NULL;
DWORD dwDisposition = 0;
if (RegCreateKeyEx(
HKEY_LOCAL_MACHINE,
pszKey,
0, NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, &dwDisposition
) != ERROR_SUCCESS)
{
::MessageBoxW( NULL, L"Registration Error 1", L"Registration", MB_OK );
return;
}

if( RegSetValueEx(
hKey,
V_EFFECT_KEY_NAME,
0,
REG_EXPAND_SZ,
(const unsigned char *)pszName,
wcslen(pszName) ) != ERROR_SUCCESS)
{
::MessageBoxW( NULL, L"Registration Error 2", L"Registration", MB_OK );
}

if( RegSetValueEx(
hKey,
V_EFFECT_KEY_GROUPNAME,
0,
REG_EXPAND_SZ,
(const unsigned char *)pszGroupName,
wcslen(pszGroupName) ) != ERROR_SUCCESS)
{
::MessageBoxW( NULL, L"Registration Error 3", L"Registration", MB_OK );
}
}
else
{
HKEY hKey = NULL;
DWORD dwDisposition = 0;
if (RegDeleteKey(
HKEY_LOCAL_MACHINE,
pszKey
) != ERROR_SUCCESS)
{
::MessageBoxW( NULL, L"Unregistration Error 1", L"Unregistration", MB_OK );
return;
}
}
 
Share this answer
 
Comments
ShilpiP 16-Nov-10 11:35am    
Good :)
[no name] 14-Dec-10 8:18am    
I think, that it is because of MFC is from VC 6.0

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900