Error opening recording device 9999 on Windows 7

I recently ran into a problem with my computer. It shows the following error when I would like to start recording.

Error opening recording device.
Error code: -9999 Unanticipated host error

I am using Windows Direct Sound with my headset. The other software actually works with my headset but only Audacity cant. I tried updating/deleting the driver, reinstalling the Audacity and literally all the possible solutions that I have found online but still no lucky. Here are the information of my computer, please kindly help.

OS: Windows 7 Professional
Driver: Realtek High Definition Audio
Headset: Simple headset with 2 3.5mm connector
Setting: Windows Direct Sound + Mic(Realtek High Definition Audio) *This works for my the other computer which is also running Windows 7 Pro but the hardware is a little different.
Project Rate: I tried both 44100 and 48000Hz Stereo

Please kindly give me some advice on how to fix this. Thanks a lot.

Unfortunately this is a “fall through” error message from PortAudio.
Audacity uses PortAudio to connect to the computer’s sound system. If PortAudio hits a problem communicating with the sound system, it runs through a list of possible problems and returns an error number and error message according to what the problem is. Error number -9999 means “none of the above, it’s an unexpected problem”.

A while ago on Windows 10, there was an update that blocked access to the audio system by default. This caused the error “-9999 Unanticipated host error”. In order to access the sound system, the user has to give permission for Audacity to use the “microphone” (Windows calls it a “microphone” whatever type of audio device is being used). We posted the solution (for Windows 10) here:
It’s possible that Microsoft may have rolled out a similar update for Windows 7, but the permissions settings in Window 7 are different from Win 10, so the exact details are likely to be different.

Has it ever worked on this computer?
If it has, then you could try rolling back to a restore point when it worked. If that fixes it, then you could do a selective update to find out which update causes the problem.