DantanaSwat
IS-IT--Management
So I got the Dave Roth book on Win32 Scripting for System admins (Im very new to perland scripting in general) and the script Ive written down suddenly take up all of the VM. Im using PerlIDE and I believe it happens when it makes the Apilink('kernal.32.dll'
seems to be filling up right there.
Version
This is perl, v5.8.3 built for MSWin32-x86-multi-thread
(with 8 registered patches, see perl -V for more detail)
Copyright 1987-2003, Larry Wall
Binary build 809 provided by ActiveState Corp. ActiveState is a division of Sophos.
Built Feb 3 2004 00:28:51
Repositories
[1] ActiveState PPM2 Repository
[2] ActiveState Package Repository
[3] Roth_Consulting
and the program has
use Win32;
use GetOpt::Long;
use Win32::NetAdmin;
use Win32::AdminMisc;
use Win32::API:
rototype;to start off with
installed packages are
1. ActivePerl-DocTools [0.04] Perl extension for Documentation TOC Generation
2. ActiveState-RelocateTree [0.03] Relocate a Perl installation
3. ActiveState-Rx [0.60] Regular Expression Debugger
4. Archive-Tar [1.07] Manipulates TAR archives
5. Compress-Zlib [1.22] Interface to zlib compression library
6. Data-Dump [1.01] Pretty printing of data structures
7. Digest-HMAC [1.01] Keyed-Hashing for Message Authentication
8. Digest-MD2 [2.03] Perl interface to the MD2 Algorithm
9. Digest-MD4 [1.1] Perl interface to the MD4 Algorithm
10. Digest-SHA1 [2.06] Perl interface to the SHA-1 Algorithm
11. File-CounterFile [1.01] Persistent counter class
12. Font-AFM [1.18] Interface to Adobe Font Metrics files
13. HTML-Parser [3.34] HTML parser class
14. HTML-Tagset [3.03] Data tables useful in parsing HTML
15. HTML-Tree [3.18] build and scan parse-trees of HTML
16. IO-Zlib [1.01] IO:: style interface to Compress::Zlib
17. libwin32 [0.21] A collection of extensions that aims to provide comprehensive access
to the Windows API.
18. lib [5.75] Library for in Perl
19. MD5 [2.02] Perl interface to the MD5 Algorithm (obsolete)
20. Net-Ping-External [0.11] Cross-platform interface to ICMP "ping" utilities
21. PPM3 [3.1] Perl Package Manager: locate, install, upgrade software packages.
22. SOAP-Lite [0.55] Library for Simple Object Access Protocol (SOAP) clients and servers in Perl
23. Tk [800.024] A Graphical User Interface Toolkit
24. URI [1.27] Uniform Resource Identifiers (absolute and relative)
25. Win32-AdminMisc [0.2003.07.14] The Win32::AdminMisc extension for Win32 X86
26. Win32-API [0.41] Perl Win32 API Import Facility
27. Win32-API-Prototype [0.2002.12.17]
The Win32::API:
rototype module.
Simplifies using Win32::API by accepting a C function prot~
28. Win32-AuthenticateUser [0.02] Win32 User authentication for domains
29. Win32-Daemon [0.2003.06.17] The Win32:
aemon extension for Win32 X86. Allows Perl to be a Win32 service.
30. Win32-Lanman [1.0.10] Contains the most important calls from the MS-Lanmanager API.
31. Win32-OLE [0.1403] OLE Automation extensions
32. XML-Parser [2.34] A Perl module for parsing XML documents
33. XML-Simple [2.09] Easy API to read/write XML (esp config files)
any ideas where I may start?
Code:
if(Apilink('kernal32.dll', 'DWORD GetTimeZoneInformation(PVOID pTZInfo)'))
{
my $pTZInfo = NewString(200);
my $Result = GetTimeZoneInformation($pTZInfo);
if(0 == $result || 2 == $Result)
{
$TZOffset = unpack('1', $pTZInfo) / 60;
}
}
Version
This is perl, v5.8.3 built for MSWin32-x86-multi-thread
(with 8 registered patches, see perl -V for more detail)
Copyright 1987-2003, Larry Wall
Binary build 809 provided by ActiveState Corp. ActiveState is a division of Sophos.
Built Feb 3 2004 00:28:51
Repositories
[1] ActiveState PPM2 Repository
[2] ActiveState Package Repository
[3] Roth_Consulting
and the program has
use Win32;
use GetOpt::Long;
use Win32::NetAdmin;
use Win32::AdminMisc;
use Win32::API:
installed packages are
1. ActivePerl-DocTools [0.04] Perl extension for Documentation TOC Generation
2. ActiveState-RelocateTree [0.03] Relocate a Perl installation
3. ActiveState-Rx [0.60] Regular Expression Debugger
4. Archive-Tar [1.07] Manipulates TAR archives
5. Compress-Zlib [1.22] Interface to zlib compression library
6. Data-Dump [1.01] Pretty printing of data structures
7. Digest-HMAC [1.01] Keyed-Hashing for Message Authentication
8. Digest-MD2 [2.03] Perl interface to the MD2 Algorithm
9. Digest-MD4 [1.1] Perl interface to the MD4 Algorithm
10. Digest-SHA1 [2.06] Perl interface to the SHA-1 Algorithm
11. File-CounterFile [1.01] Persistent counter class
12. Font-AFM [1.18] Interface to Adobe Font Metrics files
13. HTML-Parser [3.34] HTML parser class
14. HTML-Tagset [3.03] Data tables useful in parsing HTML
15. HTML-Tree [3.18] build and scan parse-trees of HTML
16. IO-Zlib [1.01] IO:: style interface to Compress::Zlib
17. libwin32 [0.21] A collection of extensions that aims to provide comprehensive access
to the Windows API.
18. lib [5.75] Library for in Perl
19. MD5 [2.02] Perl interface to the MD5 Algorithm (obsolete)
20. Net-Ping-External [0.11] Cross-platform interface to ICMP "ping" utilities
21. PPM3 [3.1] Perl Package Manager: locate, install, upgrade software packages.
22. SOAP-Lite [0.55] Library for Simple Object Access Protocol (SOAP) clients and servers in Perl
23. Tk [800.024] A Graphical User Interface Toolkit
24. URI [1.27] Uniform Resource Identifiers (absolute and relative)
25. Win32-AdminMisc [0.2003.07.14] The Win32::AdminMisc extension for Win32 X86
26. Win32-API [0.41] Perl Win32 API Import Facility
27. Win32-API-Prototype [0.2002.12.17]
The Win32::API:
Simplifies using Win32::API by accepting a C function prot~
28. Win32-AuthenticateUser [0.02] Win32 User authentication for domains
29. Win32-Daemon [0.2003.06.17] The Win32:
30. Win32-Lanman [1.0.10] Contains the most important calls from the MS-Lanmanager API.
31. Win32-OLE [0.1403] OLE Automation extensions
32. XML-Parser [2.34] A Perl module for parsing XML documents
33. XML-Simple [2.09] Easy API to read/write XML (esp config files)
any ideas where I may start?