Here are the specs for your HP Pavilion dv7-4165dx Entertainment Notebook Computer. According to the specs, this model shipped with a 2.5" 640GB 5400RPM SATAII (9.5-mm or 12.5-mm tall) hard drive.
The "SMART Hard Disc Error" returned by your computer indicates that the hard drive has failed or is about to fail. You will need to replace the hard drive to solve this issue. After you have replaced the hard drive, you will need to use the HP Recovery Media you created when you first setup your computer, to return the computer to a factory like state. If you didn't create your personal HP Recovery Media, please see DVD - Windows 7 64b + Supp 2 Recovery Kit to order an HP Recovery Disc set.
If you have any further questions, please don't hesitate to ask.
Please click the white KUDOS star to show your appreciation