I knew that the anti-virus softwares detect virus by search the pattern in a database containing virus information (please correct if I'm wrong). But I don't know how about anti adware and spyware do? Do they also search in a database, look in the registry or something else? If you can give me a piece of code (in Delphi, C/C++/C#, or VB/VB.NET) (for example, detect 1 adware, and destroy it), that's great!
Thank you, and waiting for your answers!