-ULONG VirtualProtocol::AddRef()
-{
- m_refCount++;
- return m_refCount;
-}
-
-HRESULT VirtualProtocol::QueryInterface(REFIID riid, void **ppvObject)
-{
- if(riid == IID_IUnknown || riid == wxIID_IInternetProtocolRoot ||
- riid == wxIID_IInternetProtocol)
- {
- *ppvObject = (wxIInternetProtocol*)this;
- AddRef();
- return S_OK;
- }
- else
- {
- *ppvObject = NULL;
- return E_POINTER;
- }
-}
-
-ULONG VirtualProtocol::Release()
-{
- m_refCount--;
- if (m_refCount > 0)
- {
- return m_refCount;
- }
- else
- {
- delete this;
- return 0;
- }
-}