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. C / C++ / MFC
  4. exception error occurs in Navigate2 function

exception error occurs in Navigate2 function

Scheduled Pinned Locked Moved C / C++ / MFC
help
3 Posts 2 Posters 0 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.
  • N Offline
    N Offline
    nitin_pro
    wrote on last edited by
    #1

    Hello All I have an application in which i use a navigate2 function but when i make a DLL , there is an exception in navigate2 function kindly look into the matter Thanks

    _ 1 Reply Last reply
    0
    • N nitin_pro

      Hello All I have an application in which i use a navigate2 function but when i make a DLL , there is an exception in navigate2 function kindly look into the matter Thanks

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      Are you sure that the exception is occurring within the Navigate2 function. Did you check for the parameters that you pass to the function.

      Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

      N 1 Reply Last reply
      0
      • _ _AnsHUMAN_

        Are you sure that the exception is occurring within the Navigate2 function. Did you check for the parameters that you pass to the function.

        Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

        N Offline
        N Offline
        nitin_pro
        wrote on last edited by
        #3

        there are two programs one is exe ane another one is Dll in EXE there is no error and in Dll we face a exception error i 'll pass the path of the file in Navigate2 like this memset(szFolderPath, 0x00, MAX_PATH); SHGetSpecialFolderLocation(NULL,CSIDL_RECENT, &pidl); BOOL f = SHGetPathFromIDList(pidl,szFolderPath); csTempPath.Format(_T("%s"),szFolderPath); INT nTempIndex =csTempPath.Find(_T("Recent")); csTempPath =csTempPath.Mid(0,nTempIndex); csTempPath =csTempPath + _T("Local Settings\\Temp\\Sample") + csExt; hDevice = CreateFile(csTempPath, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, CREATE_ALWAYS,0,NULL); if(hDevice) { pView->Navigate2(csTempPath); pView->EnableWindow(FALSE); pView->ShowWindow(SW_NORMAL); } the same code successfully runs in an exe but when i make a dll ithe navigate function gives the error . when i debug the code error shows in this Class C:\....MFC\SRC\VIEWHTML.CPP just have a look the code where excatly the error promts i'll mark the arrow void CHtmlView::Navigate2(LPCTSTR lpszURL, DWORD dwFlags /* = 0 */, LPCTSTR lpszTargetFrameName /* = NULL */, LPCTSTR lpszHeaders /* = NULL */, LPVOID lpvPostData /* = NULL */, DWORD dwPostDataLen /* = 0 */) { ASSERT(m_pBrowserApp != NULL); COleSafeArray vPostData; if (lpvPostData != NULL) { if (dwPostDataLen == 0) dwPostDataLen = lstrlen((LPCTSTR) lpvPostData); vPostData.CreateOneDim(VT_UI1, dwPostDataLen, lpvPostData); } COleVariant vURL(lpszURL, VT_BSTR); COleVariant vHeaders(lpszHeaders, VT_BSTR); COleVariant vTargetFrameName(lpszTargetFrameName, VT_BSTR); COleVariant vFlags((long) dwFlags, VT_I4); ===>>> m_pBrowserApp->Navigate(vURL, vFlags, vTargetFrameName, vPostData, vHeaders); } kindly solve the issue thanks

        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