Click here to Skip to main content
15,901,505 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: progress window threads Pin
Sarath C19-Jan-09 19:51
Sarath C19-Jan-09 19:51 
AnswerRe: progress window threads Pin
Stuart Dootson19-Jan-09 19:55
professionalStuart Dootson19-Jan-09 19:55 
GeneralRe: progress window threads Pin
VC++Maniac19-Jan-09 20:04
VC++Maniac19-Jan-09 20:04 
AnswerRe: progress window threads Pin
David Crow20-Jan-09 8:31
David Crow20-Jan-09 8:31 
QuestionAuto detection of e-mail in rich edit control Pin
sabapathy_8019-Jan-09 17:35
sabapathy_8019-Jan-09 17:35 
AnswerRe: Auto detection of e-mail in rich edit control Pin
Randor 19-Jan-09 18:18
professional Randor 19-Jan-09 18:18 
AnswerRe: Auto detection of e-mail in rich edit control Pin
Hamid_RT20-Jan-09 19:57
Hamid_RT20-Jan-09 19:57 
QuestionWhat is the difference: LoadUserProfile -vs- RegOpenCurrentUser Pin
Will580119-Jan-09 10:34
Will580119-Jan-09 10:34 
These two APIs are very similar but it is unclear what the differences are and when each should be used (Except that LoadUserProfile is specified for use with CreateProcessAsUser which I am not using. I am simply impersonating for hive accesss).

LoadUserProfile
http://msdn.microsoft.com/en-us/library/bb762281(VS.85).aspx

RegOpenCurrentUser
http://msdn.microsoft.com/en-us/library/ms724894(VS.85).aspx


According to the Services & the Registry article:
http://msdn.microsoft.com/en-us/library/ms685145(VS.85).aspx
we should use RegOpenCurrentUser when impersonating.

But what does/should RegOpenCurrentUser do if the user profile is roaming - should it load it?

As far as I can tell from these docs, both APIs provide a handle to the HKEY_CURRENT_USER for the user the thread is impersonating. Therefore, they both "load" the hive i.e. lock it as a database file and give a handle to it for registry APIs.

It might seem that LoadUserProfile loads the user profile in the same way as the User does when he/she logs on, whereas RegOpenCurrentUser does not - is this correct? What is the fundamental difference (if any) in how these two APIs mount the hive?

What are the implications and differences (if any) between what happens IF

1. A user logs-on or logs-off while each of these impersonated handles is already in use?

2. A user is already logged-on when each matching close function (RegCloseKey and UnloadUserProfile) is called?
QuestionImpersonating users to access hives - various methods, what are the practical issues? Pin
Will580119-Jan-09 10:03
Will580119-Jan-09 10:03 
QuestionMedia player 10 like toolbar using Win32 Pin
Aamir Mughal19-Jan-09 8:22
Aamir Mughal19-Jan-09 8:22 
AnswerRe: Media player 10 like toolbar using Win32 [modified] Pin
Code-o-mat19-Jan-09 10:00
Code-o-mat19-Jan-09 10:00 
QuestionHow to determine programatically if a drive letter (for example, 'E:\') is a CD/DVD device? [SOLVED] Pin
sashoalm19-Jan-09 5:32
sashoalm19-Jan-09 5:32 
AnswerRe: How to determine programatically if a drive letter (for example, 'E:\') is a CD/DVD device? Pin
Randor 19-Jan-09 5:52
professional Randor 19-Jan-09 5:52 
GeneralRe: How to determine programatically if a drive letter (for example, 'E:\') is a CD/DVD device? Pin
sashoalm19-Jan-09 6:16
sashoalm19-Jan-09 6:16 
GeneralRe: How to determine programatically if a drive letter (for example, 'E:\') is a CD/DVD device? [modified] PinPopular
Randor 19-Jan-09 9:53
professional Randor 19-Jan-09 9:53 
AnswerRe: How to determine programatically if a drive letter (for example, 'E:\') is a CD/DVD device? [SOLVED] Pin
Hamid_RT20-Jan-09 19:55
Hamid_RT20-Jan-09 19:55 
QuestionIs it theoretically possible to instantiate an abstract C++ class ? How ? Pin
Ahmed Charfeddine19-Jan-09 4:04
Ahmed Charfeddine19-Jan-09 4:04 
AnswerRe: Is it theoretically possible to instantiate an abstract C++ class ? How ? Pin
Stuart Dootson19-Jan-09 4:16
professionalStuart Dootson19-Jan-09 4:16 
GeneralRe: Is it theoretically possible to instantiate an abstract C++ class ? How ? Pin
Ahmed Charfeddine19-Jan-09 4:25
Ahmed Charfeddine19-Jan-09 4:25 
GeneralRe: Is it theoretically possible to instantiate an abstract C++ class ? How ? Pin
CPallini19-Jan-09 4:35
mveCPallini19-Jan-09 4:35 
GeneralRe: Is it theoretically possible to instantiate an abstract C++ class ? How ? Pin
Ahmed Charfeddine19-Jan-09 4:41
Ahmed Charfeddine19-Jan-09 4:41 
GeneralRe: Is it theoretically possible to instantiate an abstract C++ class ? How ? Pin
CPallini19-Jan-09 5:10
mveCPallini19-Jan-09 5:10 
GeneralRe: Is it theoretically possible to instantiate an abstract C++ class ? How ? Pin
Stuart Dootson19-Jan-09 4:40
professionalStuart Dootson19-Jan-09 4:40 
GeneralRe: Is it theoretically possible to instantiate an abstract C++ class ? How ? Pin
Ahmed Charfeddine19-Jan-09 4:47
Ahmed Charfeddine19-Jan-09 4:47 
GeneralRe: Is it theoretically possible to instantiate an abstract C++ class ? How ? Pin
Luc Pattyn19-Jan-09 5:19
sitebuilderLuc Pattyn19-Jan-09 5:19 

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.