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

C / C++ / MFC

 
GeneralRe: Understanding HEAP: Free Heap block errors Pin
Rama Krishna Vavilala6-Sep-03 11:05
Rama Krishna Vavilala6-Sep-03 11:05 
GeneralRe: Understanding HEAP: Free Heap block errors Pin
Jim Crafton6-Sep-03 11:08
Jim Crafton6-Sep-03 11:08 
QuestionFastest Text api? Pin
Roggan6-Sep-03 7:18
Roggan6-Sep-03 7:18 
GeneralSendMessage() Pin
lpRomang6-Sep-03 5:44
lpRomang6-Sep-03 5:44 
GeneralRe: SendMessage() Pin
Michael Dunn6-Sep-03 5:58
sitebuilderMichael Dunn6-Sep-03 5:58 
QuestionCView in DLL, CDocument in EXE :: How to share? Pin
clintsinger6-Sep-03 5:40
clintsinger6-Sep-03 5:40 
QuestionRegDeleteValue with REG_MULTI_SX/MoveFileEx? Pin
Kayembi6-Sep-03 5:16
Kayembi6-Sep-03 5:16 
AnswerRe: RegDeleteValue with REG_MULTI_SX/MoveFileEx? Pin
Kayembi7-Sep-03 2:35
Kayembi7-Sep-03 2:35 
Can anybody help? Smile | :)

I discovered that my problem was that the strings I was trying to delete individually weren't the registry values, but "PendingFileRenameOperations" was the value - which I was treating as a key.

Thus, I can use this code successfully to remove "PendingFileRenameOperations", the value created by MoveFileEx:

[code]
HKEY hKey;
char szRegKey[MAX_PATH];

RegOpenKeyEx(HKEY_LOCAL_MACHINE,
"SYSTEM\\CurrentControlSet\\Control\\Session Manager",
0,KEY_ALL_ACCESS,&hKey);

RegDeleteValue(hKey,"PendingFileRenameOperations");

RegCloseKey(hKey);
[/code]

The problem with this, of course, is that if any other programs have used MoveFileEx with MOVEFILE_DELAY_UNTIL_REBOOT, then my program will delete all this info too, which is undesirable.

Does anyone know how I can delete *only* the strings that my program has added to the PendingFileRenameOperations value?

Or, is there a function that will allow me to back up the original "PendingFileRenameOperations" value when my program starts (eg. by copying it with a different name), then add the values I need, then if my program ends normally I can replace the updated "PendingFileRenameOperations" with the backup (so that in effect the values I have added are deleted)?

Many thanks for any help,
KB
GeneralRe: RegDeleteValue with REG_MULTI_SX/MoveFileEx? Pin
Kayembi7-Sep-03 3:49
Kayembi7-Sep-03 3:49 
GeneralSet the Bk color of a list ctrl Pin
Md Saleem Navalur6-Sep-03 3:07
Md Saleem Navalur6-Sep-03 3:07 
GeneralRe: Set the Bk color of a list ctrl Pin
valikac6-Sep-03 5:07
valikac6-Sep-03 5:07 
GeneralRe: Set the Bk color of a list ctrl Pin
Michael Dunn6-Sep-03 6:05
sitebuilderMichael Dunn6-Sep-03 6:05 
GeneralRe: Set the Bk color of a list ctrl Pin
Jörgen Sigvardsson6-Sep-03 11:33
Jörgen Sigvardsson6-Sep-03 11:33 
GeneralRe: Set the Bk color of a list ctrl Pin
Anthony_Yio7-Sep-03 0:24
Anthony_Yio7-Sep-03 0:24 
QuestionBringing a window to the top? Pin
Dov Sherman5-Sep-03 18:18
Dov Sherman5-Sep-03 18:18 
AnswerRe: Bringing a window to the top? Pin
Michael Dunn5-Sep-03 18:50
sitebuilderMichael Dunn5-Sep-03 18:50 
AnswerRe: Bringing a window to the top? Pin
Neville Franks5-Sep-03 23:26
Neville Franks5-Sep-03 23:26 
QuestionThe best way 2 skin an application? Pin
Roland19805-Sep-03 12:03
sussRoland19805-Sep-03 12:03 
AnswerRe: The best way 2 skin an application? Pin
Phil Speller5-Sep-03 12:50
Phil Speller5-Sep-03 12:50 
Questionhow to get the number of digits Pin
elmahdy5-Sep-03 11:50
elmahdy5-Sep-03 11:50 
AnswerRe: how to get the number of digits Pin
Shog95-Sep-03 12:26
sitebuilderShog95-Sep-03 12:26 
AnswerRe: how to get the number of digits Pin
David Crow5-Sep-03 15:00
David Crow5-Sep-03 15:00 
AnswerRe: how to get the number of digits Pin
Terry O'Nolley5-Sep-03 18:25
Terry O'Nolley5-Sep-03 18:25 
AnswerRe: how to get the number of digits Pin
Ted Ferenc6-Sep-03 9:50
Ted Ferenc6-Sep-03 9:50 
GeneralArrays; Pin
Bo Hunter5-Sep-03 11:13
Bo Hunter5-Sep-03 11:13 

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.