djberg96 has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to get event source information. Specifically, I want to get a list of available event categories. Here's a sample of what I've got so far and it's output:
And it's output:use strict; use Win32::TieRegistry; my $key = "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Services"; $key .= "\\EventLog\\Application\\MSDTC"; my $vals = $Registry->{$key} or die "Can't find the Windows tips: $^E +\n"; foreach my $k (keys %$vals){ if($k =~ /CategoryCount/){ print "$k => ", hex($vals->{$k}), "\n"; } else{ print "$k => $vals->{$k}\n"; } }
EventMessageFile => C:\WINNT\System32\MSDTCPRX.DLL TypesSupported => 0x00000007 CategoryMessageFile => C:\WINNT\System32\MSDTCPRX.DLL CategoryCount => 18
This is all well and good. I can see that there are 18 categories for the MSDTC app, and I can see the corresponding DLL file.
Now, my question is - how do I get the actual category names out of 'C:\WINNT\System32\MSDTCPRX.DLL'? Is this possible with Win32::TieRegistry (or another Win32 module)? Any and all help much appreciated. Regards, Dan
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::TieRegistry and DLL information
by PodMaster (Abbot) on Nov 09, 2003 at 07:26 UTC |