Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Win32::TieRegistry and DLL information

by djberg96 (Acolyte)
on Nov 08, 2003 at 22:56 UTC ( [id://305606]=perlquestion: print w/replies, xml ) Need Help??

djberg96 has asked for the wisdom of the Perl Monks concerning the following question:

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

Replies are listed 'Best First'.
Re: Win32::TieRegistry and DLL information
by PodMaster (Abbot) on Nov 09, 2003 at 07:26 UTC
    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
    If the data is in the registry, then you get it out of the registry. If it's not, you find out where it is, and get it out (it's up to you to research this). Modules of interest are Win32::API, ?Win32::File::VersionInfo.... Win32::

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://305606]
Approved by Limbic~Region
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (6)
As of 2024-04-23 16:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found