Click here to Skip to main content
15,912,837 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Attach the caption of the child window to the Frame Pin
prithaa10-Oct-07 21:44
prithaa10-Oct-07 21:44 
GeneralRe: Attach the caption of the child window to the Frame Pin
Nelek12-Oct-07 1:52
protectorNelek12-Oct-07 1:52 
QuestionHow "Winmain()" works in MFC? and From where it is called? Pin
Sethuraman.K10-Oct-07 19:50
Sethuraman.K10-Oct-07 19:50 
AnswerRe: How "Winmain()" works in MFC? and From where it is called? Pin
Nibu babu thomas10-Oct-07 20:01
Nibu babu thomas10-Oct-07 20:01 
GeneralRe: How "Winmain()" works in MFC? and From where it is called? Pin
Sethuraman.K10-Oct-07 20:07
Sethuraman.K10-Oct-07 20:07 
AnswerRe: How "Winmain()" works in MFC? and From where it is called? Pin
David Crow11-Oct-07 3:36
David Crow11-Oct-07 3:36 
QuestionRegistry Restore Using A Service Pin
nagadravid10-Oct-07 19:35
nagadravid10-Oct-07 19:35 
AnswerRe: Registry Restore Using A Service Pin
vipin_nvk10-Oct-07 21:09
vipin_nvk10-Oct-07 21:09 
hm.. i faced a similar problem last week.

The problem is that a windows service runs in a LOCAL SYSTEM account and not in the account in which the user is currently logged in. Hence, if you try to take backups under registry key HKCR then the registry back up would fail.

What you have to do under this condition is write a code something like this:

<br />
HKEY hKey;	<br />
long error;<br />
<br />
HANDLE hToken = NULL;<br />
BOOL bEnablePrivilege  = TRUE;<br />
<br />
// obtain the explorer handle to get the hToken<br />
if(GetExplorerToken(hToken)) // write ur function to get explorer token!!<br />
{<br />
 if(hToken != NULL)<br />
 {<br />
	ImpersonateLoggedOnUser(hToken);<br />
<br />
	error = RegOpenKeyEx(HKEY_CURRENT_USER,strRegPath,0,KEY_ALL_ACCESS,&hKey);<br />
<br />
	RevertToSelf();<br />
 }<br />
}<br />


Now, you can use the hKey obtained to open the required registry key under HKCR and take the back up!!

Cheers
QuestionHelp:Multi-threading Pin
himuskanhere10-Oct-07 19:26
himuskanhere10-Oct-07 19:26 
QuestionUuidFromString not creating GUID correctly - Help! Pin
Priya_Sundar10-Oct-07 19:10
Priya_Sundar10-Oct-07 19:10 
AnswerRe: UuidFromString not creating GUID correctly - Help! Pin
Sachinpatole10-Oct-07 19:15
Sachinpatole10-Oct-07 19:15 
GeneralRe: UuidFromString not creating GUID correctly - Help! Pin
Priya_Sundar10-Oct-07 19:27
Priya_Sundar10-Oct-07 19:27 
AnswerRe: UuidFromString not creating GUID correctly - Help! Pin
Nibu babu thomas10-Oct-07 19:36
Nibu babu thomas10-Oct-07 19:36 
GeneralRe: UuidFromString not creating GUID correctly - Help! Pin
Priya_Sundar10-Oct-07 19:43
Priya_Sundar10-Oct-07 19:43 
GeneralRe: UuidFromString not creating GUID correctly - Help! Pin
Nibu babu thomas10-Oct-07 19:47
Nibu babu thomas10-Oct-07 19:47 
GeneralRe: UuidFromString not creating GUID correctly - Help! Pin
Priya_Sundar10-Oct-07 20:34
Priya_Sundar10-Oct-07 20:34 
GeneralRe: UuidFromString not creating GUID correctly - Help! Pin
Nibu babu thomas10-Oct-07 20:37
Nibu babu thomas10-Oct-07 20:37 
GeneralRe: UuidFromString not creating GUID correctly - Help! Pin
Priya_Sundar10-Oct-07 21:07
Priya_Sundar10-Oct-07 21:07 
QuestionWhat is core dump ? Pin
Yashusid10-Oct-07 18:52
Yashusid10-Oct-07 18:52 
QuestionMessagebox problem Pin
Lakshmi_p10-Oct-07 18:41
Lakshmi_p10-Oct-07 18:41 
AnswerRe: Messagebox problem Pin
Sachinpatole10-Oct-07 19:18
Sachinpatole10-Oct-07 19:18 
AnswerRe: Messagebox problem Pin
Nibu babu thomas10-Oct-07 19:31
Nibu babu thomas10-Oct-07 19:31 
GeneralRe: Messagebox problem Pin
Naveen10-Oct-07 20:06
Naveen10-Oct-07 20:06 
GeneralRe: Messagebox problem Pin
Nibu babu thomas10-Oct-07 22:10
Nibu babu thomas10-Oct-07 22:10 
GeneralRe: Messagebox problem Pin
Lakshmi_p10-Oct-07 20:14
Lakshmi_p10-Oct-07 20:14 

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.