Please help me! I'm lost! (Again!)
-
Ok, I've got an ATL appwizard with MFC support. Implemented a ActiveX server object (I'm trying to write an ASP extension to interface to some code i've already got working elsewhere). To test the theories of ATL and COM, I'm trying to make a simple propert that returns the IP address of the client (from Request.ServerVariables("REMOTE_ADDR") ). Here's the function I'm trying to use: STDMETHODIMP CMyClass::get_GetIP(BSTR *pVal) { AFX_MANAGE_STATE(AfxGetStaticModuleState()) IRequestDictionary *piRequestDic; m_piRequest->get_ServerVariables(&piRequestDic); VARIANT v_Param, v_Value; _variant_t vt_Param; vt_Param.Attach(v_Param); vt_Param.Clear(); vt_Param.ChangeType(VT_BSTR,NULL); vt_Param.SetString("REMOTE_ADDR"); piRequestDic->get_Item(v_Param,&v_Value); VariantChangeType(&v_Value,&v_Value,0,VT_BSTR); *pVal=v_Value.bstrVal; return S_OK; } When I call a simple asp page that creates this object and attempts to read this GetIP property, IIS hangs. I have to use Winnt reskit's KILL.EXE to close it. I have no idea whats wrong- i've followed my logic through several times and i'm oblivious to the prob. help appreaciated thanks jon h