Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 38 lines (33 sloc) 1.646 kb
067439e @cosimo Load Win32-API-0.40 into trunk/Win32-API.
authored
1 use Win32::kernel32;
ebbafaf @cosimo General perltidy applied to everything
authored
2
067439e @cosimo Load Win32-API-0.40 into trunk/Win32-API.
authored
3 # ... or: use Win32::kernel32 qw( Sleep SetLastError );
4
5 print "Sleep: sleeping 2,5 second...";
6 Win32::Sleep(2500);
7 print "done\n\n";
8
ebbafaf @cosimo General perltidy applied to everything
authored
9 print "GetTempPath: ", Win32::GetTempPath(), "\n\n";
10 print "GetBinaryType(C:\\windows\\notepad.exe): ",
11 Win32::GetBinaryType("C:\\windows\\notepad.exe"),
067439e @cosimo Load Win32-API-0.40 into trunk/Win32-API.
authored
12 "\n\n";
ebbafaf @cosimo General perltidy applied to everything
authored
13 print "GetVolumeInformation(): ", scalar(Win32::GetVolumeInformation()), "\n\n";
14 ($label, $serial, $maxlen, $flags, $fstype) = Win32::GetVolumeInformation("c:\\");
15 print "GetVolumeInformation(C:\\).label: ", $label, "\n";
067439e @cosimo Load Win32-API-0.40 into trunk/Win32-API.
authored
16 print "GetVolumeInformation(C:\\).serial: ", $serial, "\n";
17 print "GetVolumeInformation(C:\\).maxlen: ", $maxlen, "\n";
ebbafaf @cosimo General perltidy applied to everything
authored
18 print "GetVolumeInformation(C:\\).flags: ", $flags, "\n";
067439e @cosimo Load Win32-API-0.40 into trunk/Win32-API.
authored
19 print "GetVolumeInformation(C:\\).fstype: ", $fstype, "\n\n";
ebbafaf @cosimo General perltidy applied to everything
authored
20 print "GetDiskFreeSpace(): ", join("/", Win32::GetDiskFreeSpace()), "\n\n";
21 print "VerLanguageName(1040): ", Win32::VerLanguageName(1040), "\n\n";
22 print "CopyFile(kernel32.pl, Copy of kernel32.pl): ",
23 (Win32::CopyFile("kernel32.pl", "Copy of kernel32.pl"))
24 ? "OK"
25 : "Failed, file exists",
26 "\n\n";
27 print "CopyFile(kernel32.pl, Copy of kernel32.pl, 0): ",
28 (Win32::CopyFile("kernel32.pl", "Copy of kernel32.pl", 0)) ? "OK" : "Failed",
29 "\n\n";
30 print "QueryDosDevice(): \n\t", join("\n\t", Win32::QueryDosDevice()), "\n\n";
31 print "GetCommandLine: \"", Win32::GetCommandLine(), "\"\n\n";
32 print "GetCurrencyFormat(3185928): \"", Win32::GetCurrencyFormat("3185928"), "\"\n\n";
33 print "GetDriveType(): ", Win32::GetDriveType(), "\n\n";
067439e @cosimo Load Win32-API-0.40 into trunk/Win32-API.
authored
34
35 print "Press ENTER to view the kernel32.pm documentation: ";
36 $enter = <STDIN>;
ebbafaf @cosimo General perltidy applied to everything
authored
37 `start kernel32.html`;
Something went wrong with that request. Please try again.