Click here to Skip to main content
16,010,876 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: [win32]ListView doesn't generate VK_RETURN Pin
JT Anderson1-Jul-03 12:20
JT Anderson1-Jul-03 12:20 
GeneralRe: [win32]ListView doesn't generate VK_RETURN Pin
Melekor1-Jul-03 13:06
Melekor1-Jul-03 13:06 
GeneralRe: [win32]ListView doesn't generate VK_RETURN Pin
JT Anderson1-Jul-03 13:41
JT Anderson1-Jul-03 13:41 
GeneralRe: [win32]ListView doesn't generate VK_RETURN Pin
Melekor2-Jul-03 8:06
Melekor2-Jul-03 8:06 
GeneralRe: [win32]ListView doesn't generate VK_RETURN Pin
JT Anderson2-Jul-03 8:19
JT Anderson2-Jul-03 8:19 
Generalusing StgOopenStorageEx.. to know type of the file Pin
pnpfriend29-Jun-03 11:08
pnpfriend29-Jun-03 11:08 
GeneralRe: using StgOopenStorageEx.. to know type of the file Pin
pnpfriend1-Jul-03 5:23
pnpfriend1-Jul-03 5:23 
GeneralDelete user EventLog file Pin
cmk29-Jun-03 10:50
cmk29-Jun-03 10:50 
Ok, I posted this to Operating Systems/SysAdmin back on Jun.6.
Let's see if any C++ people can help me.

I'm trying to find a way to delete a user-defined EventLog file.

I create the reg keys (for example) :
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EventLog\My Log
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EventLog\My Log\File
and set ...\File = %SystemRoot%\system32\config\MyLog.evt

The file MyLog.evt is created by the EventLog monitor ... as expected.

Unfortunately it (services.exe i.e. EventLog monitor) maintains open references (4 it seems) to the file handle.
I guess it was a bit of wishfull thinking to hope that the handle would be closed when the reg key ...\My Log was deleted (and yes I make sure there are no sources left using the EventLog before I try to delete it).

My current solution is to queue a MoveFileEx(MOVEFILE_DELAY_UNTIL_REBOOT | MOVEFILE_REPLACE_EXISTING) to a hardcoded filename in the temp directory.

Does anyone know of another way to get the ELM to release all references (close the handle) from C++ Win32 so that I don't need a reboot ?

I don't have .NET installed although I noticed it has a class that wraps access to EventLogs i.e. EventLog, and has a Delete method to delete a custom log file.
Does anyone know how the .NET EventLog.Delete works ?



...cmk
GeneralCString problem Pin
Sunnygirl29-Jun-03 8:36
Sunnygirl29-Jun-03 8:36 
GeneralRe: CString problem Pin
Ravi Bhavnani29-Jun-03 8:40
professionalRavi Bhavnani29-Jun-03 8:40 
GeneralRe: CString problem Pin
Sunnygirl29-Jun-03 9:00
Sunnygirl29-Jun-03 9:00 
GeneralRe: CString problem Pin
Chris Losinger29-Jun-03 8:40
professionalChris Losinger29-Jun-03 8:40 
GeneralRe: CString problem Pin
Sunnygirl29-Jun-03 9:01
Sunnygirl29-Jun-03 9:01 
GeneralRe: CString problem Pin
FlyingDancer29-Jun-03 18:53
FlyingDancer29-Jun-03 18:53 
GeneralRe: CString problem Pin
FlyingDancer29-Jun-03 19:06
FlyingDancer29-Jun-03 19:06 
GeneralRe: CString problem Pin
Michael Dunn29-Jun-03 19:41
sitebuilderMichael Dunn29-Jun-03 19:41 
GeneralRe: CString problem Pin
FlyingDancer30-Jun-03 3:43
FlyingDancer30-Jun-03 3:43 
GeneralA general solution Pin
Trollslayer30-Jun-03 1:45
mentorTrollslayer30-Jun-03 1:45 
GeneralProblem using Flat Scroll Bars Pin
miguel.lopes@lsi.pt29-Jun-03 7:03
sussmiguel.lopes@lsi.pt29-Jun-03 7:03 
GeneralRepeating socket connection Pin
Anonymous29-Jun-03 3:20
Anonymous29-Jun-03 3:20 
GeneralRe: Repeating socket connection Pin
valikac29-Jun-03 6:24
valikac29-Jun-03 6:24 
GeneralComparing BOOL values Pin
Abin29-Jun-03 2:54
Abin29-Jun-03 2:54 
GeneralRe: Comparing BOOL values Pin
Nick Parker29-Jun-03 2:58
protectorNick Parker29-Jun-03 2:58 
GeneralRe: Comparing BOOL values Pin
Angel Kid29-Jun-03 3:00
Angel Kid29-Jun-03 3:00 
GeneralRe: Comparing BOOL values Pin
Tibor Blazko29-Jun-03 4:12
Tibor Blazko29-Jun-03 4:12 

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.