If all you want to do is connect the two computers directly, i.e. there is no "internet" involvement in the arrangement, connect a *CROSSOVER* ethernet cable between their network adapters (the RJ45 ports).
Although Windows will by default allocate APIPA IP addresses (Automatic Private IP Addressing) in the 169.254.x.x range, you might find connections more reliable by allocating fixed IP addresses manually to the two "Local Area Connections".
To do this, open the Network Connections folder ("Start > Run", type NCPA.CPL and click OK), right click the Local Area Connection and select Properties.
In XP, highlight the entry for "Internet Protocol (TCP/IP)" and click the Properties button.
In Vista, highlight the entry for "Internet Protocol Version 4 (TCP/IPv4)" and click the Properties button.
In the Properties sheet that opens, click the option to "Use the following IP address" and type in:
IP address - 192.168.0.1 (in the first PC)
IP address - 192.168.0.2 (in the second PC)
Subnet Mask - 255.255.255.0 (in *BOTH* PCs)
Click "OK" back through all open boxes.