There is no such thing called GetUnknown that I am aware of.
Quote Originally Posted by qexing
//******Always Error Here******//

AtlAdvise(ppw, GetUnknown(), DIID_DWebBrowserEvents2, &m_dwCookie);
-----------------------------------------
It always returns an "GetUnknown--Undeclared identifier" error, and I don't know which is the base .h file.
The second parameter of AtlAdvise is IUnknown* of the client: which in this case is your application, I hope.

So, if you are calling this from a COM class, pass (IUnknown*)this, or IUnknown* of the class that implements the client, something like this -
Code:
AtlAdvise(ppw, (IUnknown*)(this), DIID_DWebBrowserEvents2, &m_dwCookie);