Click here to Skip to main content
15,886,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: boost::named_mutex not released after process abort Pin
TheGreatAndPowerfulOz26-Jan-11 9:57
TheGreatAndPowerfulOz26-Jan-11 9:57 
GeneralRe: boost::named_mutex not released after process abort [modified] Pin
WernerP26-Jan-11 11:52
WernerP26-Jan-11 11:52 
AnswerRe: boost::named_mutex not released after process abort Pin
Chuck O'Toole26-Jan-11 18:20
Chuck O'Toole26-Jan-11 18:20 
GeneralRe: boost::named_mutex not released after process abort [modified] Pin
WernerP26-Jan-11 21:48
WernerP26-Jan-11 21:48 
GeneralRe: boost::named_mutex not released after process abort Pin
Chuck O'Toole26-Jan-11 23:42
Chuck O'Toole26-Jan-11 23:42 
QuestionNeed interface index for recvd UDP packets Pin
Dave_25-Jan-11 3:50
Dave_25-Jan-11 3:50 
AnswerRe: Need interface index for recvd UDP packets Pin
HimanshuJoshi25-Jan-11 5:43
HimanshuJoshi25-Jan-11 5:43 
QuestionSet AutoRun fail under win 7 [modified][solved] Pin
yu-jian25-Jan-11 2:57
yu-jian25-Jan-11 2:57 
	CRegKey regkey;
	TCHAR modbuffer[MAX_PATH];
	DWORD dwModPathLen = ::GetModuleFileName(NULL, modbuffer, _countof(modbuffer));
	if (dwModPathLen == 0 || dwModPathLen == _countof(modbuffer))
		return;
	CString strCanonFileName = modbuffer;
	strCanonFileName.Replace(_T("%"), _T("%%"));
	CString regbuffer;
	regbuffer.Format(_T("\"%s\""), strCanonFileName);
	CString	csKeyName = _T("MyProgram");

	HKEY hkeyCR = HKEY_LOCAL_MACHINE;
	if (bAutoRun)
	{
		if (regkey.Open(hkeyCR, _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"),
			KEY_ALL_ACCESS) != ERROR_SUCCESS)
		{
			regkey.SetStringValue(csKeyName, regbuffer);
			regkey.Close();
		}
	}
	else
	{
		if (regkey.Open(hkeyCR, _T("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"), KEY_READ) != ERROR_SUCCESS)
		{
			regkey.RecurseDeleteKey(csKeyName);
			regkey.Close();
		}
	}
}


The Exception is m_Key is NULL. My system is windows 7. Is it the Priviledge problem?

modified on Tuesday, January 25, 2011 8:54 PM

AnswerRe: Set AutoRun fail under win 7 Pin
Code-o-mat25-Jan-11 3:17
Code-o-mat25-Jan-11 3:17 
AnswerRe: Set AutoRun fail under win 7 Pin
CPallini25-Jan-11 3:20
mveCPallini25-Jan-11 3:20 
AnswerRe: Set AutoRun fail under win 7 Pin
Hans Dietrich25-Jan-11 3:47
mentorHans Dietrich25-Jan-11 3:47 
AnswerRe: Set AutoRun fail under win 7 Pin
Richard MacCutchan25-Jan-11 4:47
mveRichard MacCutchan25-Jan-11 4:47 
GeneralRe: Set AutoRun fail under win 7 Pin
yu-jian25-Jan-11 6:28
yu-jian25-Jan-11 6:28 
AnswerRe: Set AutoRun fail under win 7 Pin
yu-jian25-Jan-11 6:13
yu-jian25-Jan-11 6:13 
Questionshadow copy, deep copy and bitwie copy by constructor Pin
aesthetic.crazy25-Jan-11 2:26
aesthetic.crazy25-Jan-11 2:26 
AnswerRe: shadow copy, deep copy and bitwie copy by constructor Pin
CPallini25-Jan-11 2:44
mveCPallini25-Jan-11 2:44 
AnswerRe: shadow copy, deep copy and bitwie copy by constructor Pin
T210225-Jan-11 2:59
T210225-Jan-11 2:59 
AnswerRe: shadow copy, deep copy and bitwie copy by constructor Pin
Nemanja Trifunovic25-Jan-11 5:03
Nemanja Trifunovic25-Jan-11 5:03 
AnswerRe: shadow copy, deep copy and bitwie copy by constructor Pin
Andrew Brock25-Jan-11 5:11
Andrew Brock25-Jan-11 5:11 
QuestionDialogBar in SDI in MDI applcatiion Pin
Anu_Bala24-Jan-11 22:37
Anu_Bala24-Jan-11 22:37 
QuestionHow can i delete History and Cookies Directory in Internet explorer? Pin
yogish29324-Jan-11 19:18
yogish29324-Jan-11 19:18 
AnswerRe: How can i delete History and Cookies Directory in Internet explorer? Pin
KingsGambit24-Jan-11 20:18
KingsGambit24-Jan-11 20:18 
AnswerRe: How can i delete History and Cookies Directory in Internet explorer? Pin
T210224-Jan-11 21:59
T210224-Jan-11 21:59 
QuestionBreak point not hit error in VS2005 Pin
Jia10024-Jan-11 17:28
Jia10024-Jan-11 17:28 
AnswerRe: Break point not hit error in VC2005 Pin
T210224-Jan-11 17:51
T210224-Jan-11 17:51 

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.