See
Appendix A,
Exercise Answers
for the answers.
-
Write a program that takes a machine name as input and then prints a list of all of the IP addresses for that machine (skip this example if you don't have TCP/IP installed). Try your program on something like
www.microsoft.com
that has lots of IP addresses to make sure you get it right.
-
Write a program that takes as an argument a single Registry key relative to HKEY_LOCAL_MACHINE and prints all of the values under it (don't worry about recursing into child keys or about binary data for now, just print whatever you get).
-
Write a subroutine that creates all of the keys in a path if they don't exist. To make things easier, pass in the subtree to which the path is relative.
-
Using what you know about
unpack
, write a routine that will print a hexidecimal representation of a REG_DWORD value (that is, a four-byte integer value).
|
|