ActiveState Perl 5.8 (latest)
Windows 2000

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:

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"; } }
And it's output:

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


In reply to Win32::TieRegistry and DLL information by djberg96

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.