Now I've downloaded another source code, it only gives me 3 errors:

--------------------Configuration: dxtut2 - Win32 Debug--------------------
Compiling...
dxtut2.cpp
Linking...
dxtut2.obj : error LNK2001: unresolved external symbol _Direct3DCreate8@4
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/dxtut2.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

dxtut2.exe - 3 error(s), 0 warning(s)