Click here to Skip to main content
15,905,148 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: captureing right click mouse event........ Pin
SandipG 7-Sep-08 20:12
SandipG 7-Sep-08 20:12 
GeneralRe: captureing right click mouse event........ Pin
ani_ikram7-Sep-08 20:34
ani_ikram7-Sep-08 20:34 
GeneralRe: captureing right click mouse event........ Pin
SandipG 7-Sep-08 21:15
SandipG 7-Sep-08 21:15 
GeneralRe: captureing right click mouse event........ Pin
ani_ikram7-Sep-08 21:18
ani_ikram7-Sep-08 21:18 
GeneralRe: captureing right click mouse event........ Pin
SandipG 7-Sep-08 21:25
SandipG 7-Sep-08 21:25 
GeneralRe: captureing right click mouse event........ Pin
ani_ikram9-Sep-08 17:23
ani_ikram9-Sep-08 17:23 
GeneralRe: captureing right click mouse event........ Pin
SandipG 9-Sep-08 19:02
SandipG 9-Sep-08 19:02 
QuestionRegSetValueEx crashing Pin
monsieur_jj7-Sep-08 19:28
monsieur_jj7-Sep-08 19:28 
Hi all,

I am getting an error here which usually does not happen.
I am getting

Unhandled exception at 0x77ddd83e in UpdateService.exe: 0xC0000005: Access violation reading location 0x00c7913e.

the values are:
hKey {unused=??? } HKEY__ *
lpValueName 0x004b9198 "Installer" const wchar_t *
Reserved 0 unsigned long
dwType 1 unsigned long
lpData "R" const unsigned char *
cbData 520 unsigned long

I wonder why it crashes as I use the same thing to my other inputs it does not happen. the code is this:

RMRegSetValueEx(hkey,UPDATELINK,0,REG_SZ,(BYTE*)((*Iter)->link.c_str()),_MAX_PATH);		
RMRegSetValueEx(hkey,UPDATEFILE,0,REG_SZ,(BYTE*)(*Iter)->savePath.c_str(),_MAX_PATH);	
RMRegSetValueEx(hkey,UPDATEINSTALL,0,REG_SZ,(BYTE*)(*Iter)->nameVer.c_str(),_MAX_PATH); 



LONG RMRegSetValueEx(
  HKEY hKey,           // handle to key
  LPCTSTR lpValueName, // value name
  DWORD Reserved,      // reserved
  DWORD dwType,        // value type
  CONST BYTE *lpData,  // value data
  DWORD cbData         // size of value data
)
{
	do
	{
		if (lRegOperLastErr == 1450)
		{
			Sleep(100);
		}

		lRegOperLastErr = RegSetValueEx(
					hKey,			// handle to key
					lpValueName,	// value name
					Reserved,		// reserved
					dwType,			// value type
					lpData,			// value data
					cbData			// size of value data
				);
	} while (lRegOperLastErr == 1450);

	return lRegOperLastErr;
}



At the bold part where the crashing happens at only one time at a specific value, that is being used with other values but does not crash.

Please advise

thanks,
Jayjay
AnswerRe: RegSetValueEx crashing Pin
Rane7-Sep-08 20:04
Rane7-Sep-08 20:04 
GeneralRe: RegSetValueEx crashing Pin
monsieur_jj7-Sep-08 20:22
monsieur_jj7-Sep-08 20:22 
GeneralRe: RegSetValueEx crashing Pin
Rane8-Sep-08 0:07
Rane8-Sep-08 0:07 
QuestionRe: RegSetValueEx crashing Pin
CPallini7-Sep-08 23:45
mveCPallini7-Sep-08 23:45 
QuestionRe: RegSetValueEx crashing Pin
David Crow8-Sep-08 4:02
David Crow8-Sep-08 4:02 
QuestionGetting the IP adress of the computer Pin
Deepu Antony7-Sep-08 19:02
Deepu Antony7-Sep-08 19:02 
AnswerRe: Getting the IP adress of the computer Pin
_AnsHUMAN_ 7-Sep-08 19:12
_AnsHUMAN_ 7-Sep-08 19:12 
GeneralRe: Getting the IP adress of the computer Pin
Deepu Antony7-Sep-08 21:35
Deepu Antony7-Sep-08 21:35 
AnswerRe: Getting the IP adress of the computer Pin
Rane7-Sep-08 19:13
Rane7-Sep-08 19:13 
GeneralRe: Getting the IP adress of the computer Pin
Deepu Antony7-Sep-08 21:33
Deepu Antony7-Sep-08 21:33 
GeneralRe: Getting the IP adress of the computer Pin
SandipG 7-Sep-08 21:40
SandipG 7-Sep-08 21:40 
QuestionRun as Service Pin
cpvc++7-Sep-08 18:55
cpvc++7-Sep-08 18:55 
AnswerRe: Run as Service Pin
Rane7-Sep-08 19:00
Rane7-Sep-08 19:00 
AnswerRe: Run as Service Pin
Mark Salsbery8-Sep-08 6:25
Mark Salsbery8-Sep-08 6:25 
QuestionSingle Row Selection in CListCtrl ! Pin
Le@rner7-Sep-08 18:49
Le@rner7-Sep-08 18:49 
AnswerRe: Single Row Selection in CListCtrl ! Pin
_AnsHUMAN_ 7-Sep-08 19:00
_AnsHUMAN_ 7-Sep-08 19:00 
AnswerRe: Single Row Selection in CListCtrl ! Pin
Naveen7-Sep-08 19:01
Naveen7-Sep-08 19:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.