有没有介绍session文章,高手们推荐一下,谢谢!

解决方案 »

  1.   

    我有个程序,用session登陆网页,登陆后的页面我用Read得到了,是html文本.现在想用IE打开这个网页.请教高手如何做.
    另外,我刚接触session,想查些资料学习一下.
    谢谢!
      

  2.   

    #include <windows.h>
    #define INITGUID
    #include <initguid.h>
    #include <exdisp.h>
    #include <shlguid.h>
    #include <memory.h>
    #include <shlobj.h> HRESULT hr;   IWebBrowser2* pWebBrowser = NULL;
     
       if (FAILED(OleInitialize(NULL)))
       {
          return;
       }     // Instantiate a browser
       if (FAILED(hr = CoCreateInstance(CLSID_InternetExplorer,
          NULL, CLSCTX_SERVER, IID_IWebBrowser2,
                        (LPVOID*)&pWebBrowser)))
       {
          goto Error;
       }   // Show the browser, and navigate to the special location
       // represented by the pidl
       hr = pWebBrowser->put_Visible(VARIANT_TRUE); IDispatch* pDocDisp = NULL;
    hr = pWebBrowser->get_Document(&pDocDisp);

    if (pDocDisp)
    {
    IHTMLDocument2* pDoc = NULL;
    hr = pDocDisp->QueryInterface(IID_IHTMLDocument2, reinterpret_cast<void **>(&pDoc)); IHTMLElement* pElement = NULL;
    hr = pDoc->get_body(&pElement);
         CString strHtmlText = lpData;//这里传入你读到的文本
                      BSTR bstrHTMLText = strHtmlText.AllocSysString();
        hr = pElement ->put_outerHTML(&bstrHTMLText);
      

  3.   

    如果用的是session,那你没必要读到登陆后的页面。登录后,直接调用ShellExecute开个IE,打开你的那个结果页面就行了啊
      

  4.   

    我是用CHttpFile::SendRequest得到的返回页的html文本.
    请问ShellExecute可以打开吗 ?
      

  5.   

    to :goodboyws
    小弟菜点,能给个可以用的吗?看看,谢谢了!