Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. COM
  4. Please help me! I'm lost! (Again!)

Please help me! I'm lost! (Again!)

Scheduled Pinned Locked Moved COM
c++comsysadminwindows-adminhelp
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups