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. Managed C++/CLI
  4. axWebBrowser in MC++

axWebBrowser in MC++

Scheduled Pinned Locked Moved Managed C++/CLI
helpc++htmltestingbeta-testing
3 Posts 3 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.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hi all! I have done following to generate the assemblies for AXSHDocVw.dll SHDocVw.dll aximp c:\windows\system32\shdocvw.dll then I have added the reference to generated assemblies in my project and then I dragged and droped the asWebBrowser control in my form which added the reference to these assemblies again from c:\windows\system32 folder which I have removed from the references. Now when I compile it, I get compiler errors which are mentioned below: error C2653: 'AxInterop' : is not a class or namespace name error C2501: 'Testing::Form1::AxWebBrowser' : missing storage-class or type specifiers error C2501: 'Testing::Form1::axWebBrowser2' : missing storage-class or type specifiers All of these errors are pointing towards only one line of code in my form's header file which is: private: AxInterop::SHDocVw::AxWebBrowser * axWebBrowser2; All I want to do is, to load text,html,xml files from my hard drive to axWebBrowser control for display. Please Help!!!!!:doh: osAma

    U 1 Reply Last reply
    0
    • L Lost User

      Hi all! I have done following to generate the assemblies for AXSHDocVw.dll SHDocVw.dll aximp c:\windows\system32\shdocvw.dll then I have added the reference to generated assemblies in my project and then I dragged and droped the asWebBrowser control in my form which added the reference to these assemblies again from c:\windows\system32 folder which I have removed from the references. Now when I compile it, I get compiler errors which are mentioned below: error C2653: 'AxInterop' : is not a class or namespace name error C2501: 'Testing::Form1::AxWebBrowser' : missing storage-class or type specifiers error C2501: 'Testing::Form1::axWebBrowser2' : missing storage-class or type specifiers All of these errors are pointing towards only one line of code in my form's header file which is: private: AxInterop::SHDocVw::AxWebBrowser * axWebBrowser2; All I want to do is, to load text,html,xml files from my hard drive to axWebBrowser control for display. Please Help!!!!!:doh: osAma

      U Offline
      U Offline
      ursus zeta
      wrote on last edited by
      #2

      If you are getting an Interop error saying that the namespace does not exist, it's because Visual Studio .NET can not find the generated assembly. Where is it? You can put it in your project directory, this is a default Visual Studio search location. You can also set the search path by right clicking on the project in the Solution Explorer and setting the path in the appropriate property page. Read this from MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxurfVCDirectoriesProjectsOptionsDialogBox.asp[^] You want to set the path for the reference files. You must select this from the dropdown menu (the default is the #include directory). Also, Adam Nathan does exactly what you are doing in his book, ".NET and COM: The Complete Interoperability Guide"; he provides all the code and an very clear explanation about how and why you are doing what you are doing. If you are new to this kind of thing, I would recommend reading the book, it's excellent.

      O 1 Reply Last reply
      0
      • U ursus zeta

        If you are getting an Interop error saying that the namespace does not exist, it's because Visual Studio .NET can not find the generated assembly. Where is it? You can put it in your project directory, this is a default Visual Studio search location. You can also set the search path by right clicking on the project in the Solution Explorer and setting the path in the appropriate property page. Read this from MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/vxurfVCDirectoriesProjectsOptionsDialogBox.asp[^] You want to set the path for the reference files. You must select this from the dropdown menu (the default is the #include directory). Also, Adam Nathan does exactly what you are doing in his book, ".NET and COM: The Complete Interoperability Guide"; he provides all the code and an very clear explanation about how and why you are doing what you are doing. If you are new to this kind of thing, I would recommend reading the book, it's excellent.

        O Offline
        O Offline
        osamahmirza
        wrote on last edited by
        #3

        Thank you very much for such a great help!!!! Cheers

        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