It could be due to various reasons:
1. bad sectors in your disk
2. improper installation of OS
3. Certain DLLs got corrupt after some time
4. Virus on your PC
Solution is: Start system in Safe Mode, scan your harddisk for bad sectors and virus both. And if you are not able to start your system in even the safe mode, put original OS CD in your system’s CD Drive, go for a repair installation. It should work.
on startup go to command and enter chkdsk /f. this will run check disk and should diagnose OS installation problems.
if that doesn’t work and its a dll issue, go to command and type sfc /scannow. this will check protected files like DLLs (have your XP CD ready).
1. last know good configuration from the Safe Mode Boot options
2. remember what was the last thing that changed on your computer, such as software installed, updated a driver, then undo that change.