// PgCntObj.cpp : Implementation of CPgCntObj #include "stdafx.h" #include "PgCnt.h" #include "PgCntObj.h" ///////////////////////////////////////////////////////////////////////////// // STDMETHODIMP CPgCntObj::InterfaceSupportsErrorInfo(REFIID riid) { static const IID* arr[] = { &IID_IPgCntObj, }; for (int i=0;i piServerVariables; hr = cxt.Request()->get_ServerVariables(&piServerVariables); if (FAILED(hr)) { ATLTRACE(_T("Couldn't get ServerVariables\n")); return rc; } //Get the PATH_INFO item from the ServerVariables collection CComVariant vtIn(OLESTR("PATH_INFO")), vtOut; hr = piServerVariables->get_Item(vtIn, &vtOut); if (FAILED(hr)) { ATLTRACE(_T("Couldn't get PATH_INFO\n")); return rc; } // vtOut Contains an IDispatch Pointer. To fetch the value // for PATH_INFO, you must get the Default Value for the // Object stored in vtOut using VariantChangeType. hr = VariantChangeType(&rvt, &vtOut, 0, VT_BSTR); if (FAILED(hr)) { return rc; } else { rc = true; } } return rc; }