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#
  4. Problem using Dll in .net

Problem using Dll in .net

Scheduled Pinned Locked Moved C#
helpcsharpcomworkspace
6 Posts 4 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
    naresh_pandey13
    wrote on last edited by
    #1

    I m using the Com namespace "SHDocVw" .but when i m making Setup it gives me the following error and setup uncompleates. i have also copied this file in my application's bin dir but again same problem ,it gives me following error when i make setup ... ERROR: 'shdocvw.dll' should be excluded because its source file 'C:\WINDOWS\system32\shdocvw.dll' is under Windows System File Protection. please if possible give me the solution This is Jitendra This is Jitendra

    H P 2 Replies Last reply
    0
    • N naresh_pandey13

      I m using the Com namespace "SHDocVw" .but when i m making Setup it gives me the following error and setup uncompleates. i have also copied this file in my application's bin dir but again same problem ,it gives me following error when i make setup ... ERROR: 'shdocvw.dll' should be excluded because its source file 'C:\WINDOWS\system32\shdocvw.dll' is under Windows System File Protection. please if possible give me the solution This is Jitendra This is Jitendra

      H Offline
      H Offline
      Heath Stewart
      wrote on last edited by
      #2

      Generate the assembly with a different name, like Interop.SHDocVw.dll, which is what VS.NET would call it if you did imported the typelib in the shdocvw.dll library by adding a COM references in the Add Reference dialog. If you're using tlbimp.exe, use command line switches like this:

      tlbimp /out:Interop.SHDocVw.dll %WINDIR%\System32\shdocvw.dll

      Type the following for more information about the switches available for tlbimp.exe:

      tlbimp /?

      You should also consider signing this and keeping it in a global directory that's easy to reference. If you do sign it, you can install it in the GAC. Believe me, this is a common assembly in many applications, except that everyone signs it with a different key, if they sign it at all (production code should always be signed to help protect the integrity of the product, not to mention it's so easy there's no excuse not to).

      Microsoft MVP, Visual C# My Articles

      1 Reply Last reply
      0
      • N naresh_pandey13

        I m using the Com namespace "SHDocVw" .but when i m making Setup it gives me the following error and setup uncompleates. i have also copied this file in my application's bin dir but again same problem ,it gives me following error when i make setup ... ERROR: 'shdocvw.dll' should be excluded because its source file 'C:\WINDOWS\system32\shdocvw.dll' is under Windows System File Protection. please if possible give me the solution This is Jitendra This is Jitendra

        P Offline
        P Offline
        Peter Nirschl
        wrote on last edited by
        #3

        You can convert the components of SHDOCVW.DLL to ActiveX components. NOTE: This requires Visual Studio .Net! Copy the file: C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin\AxImp.exe in any directory. Then make a shortcut (or a link [I don't know the English word for it :confused::~ ]) to this file. Type this text in "target" field:

        "[location]\AxImp.exe" [path]

        [path] is the dll file to convert. After doing that in the directory will be following files: AxSHDocVw.dll and SHDocVw.dll ! Reference the file AxSHDocVw to your project. An instance of a Browser Object looks like this: private AxSHDocVw.AxWebBrowser axWebBrowser1; You can use this Object like any other Windows Components. If there are any questions left, let me know! Good luck!

        N H 2 Replies Last reply
        0
        • P Peter Nirschl

          You can convert the components of SHDOCVW.DLL to ActiveX components. NOTE: This requires Visual Studio .Net! Copy the file: C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin\AxImp.exe in any directory. Then make a shortcut (or a link [I don't know the English word for it :confused::~ ]) to this file. Type this text in "target" field:

          "[location]\AxImp.exe" [path]

          [path] is the dll file to convert. After doing that in the directory will be following files: AxSHDocVw.dll and SHDocVw.dll ! Reference the file AxSHDocVw to your project. An instance of a Browser Object looks like this: private AxSHDocVw.AxWebBrowser axWebBrowser1; You can use this Object like any other Windows Components. If there are any questions left, let me know! Good luck!

          N Offline
          N Offline
          Nick Parker
          wrote on last edited by
          #4

          petermax2 wrote: NOTE: This requires Visual Studio .Net! No it does not, Aximp.exe comes with the .NET SDK, which is free to download. Also, if you have Visual Studio .NET, you can easily add the web browser from the toolbar and it will automatically generate the interop assemblies for you. - Nick Parker
          My Blog | My Articles

          1 Reply Last reply
          0
          • P Peter Nirschl

            You can convert the components of SHDOCVW.DLL to ActiveX components. NOTE: This requires Visual Studio .Net! Copy the file: C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin\AxImp.exe in any directory. Then make a shortcut (or a link [I don't know the English word for it :confused::~ ]) to this file. Type this text in "target" field:

            "[location]\AxImp.exe" [path]

            [path] is the dll file to convert. After doing that in the directory will be following files: AxSHDocVw.dll and SHDocVw.dll ! Reference the file AxSHDocVw to your project. An instance of a Browser Object looks like this: private AxSHDocVw.AxWebBrowser axWebBrowser1; You can use this Object like any other Windows Components. If there are any questions left, let me know! Good luck!

            H Offline
            H Offline
            Heath Stewart
            wrote on last edited by
            #5

            Why go to all that trouble to execute aximp.exe or any SDK utility for that matter? Simly add "C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin" to your PATH environment variable in your System control panel. This environment variable is used to resolve executable paths when you run a problem. If it exists in the PATH, you don't need to type the full path to the executable file. It's also used by the executable loader to locate DLLs that need to be mapped into the process space. While you're at it, also add the Framework directories (ex: "C:\Windows\Microsoft.NET\Framework\v1.1.4322" so you can use the compilers and the assemblier without typing the full path. Do this for a good developer workstation setup. I make great use of it because I really don't use VS.NET for most code samples. And Nick is right, you don't need VS.NET for the Framework SDK. The .NET Framework SDKs are freely downloadable installations separate from the Framework installations that provide everything you find in "C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK" on your machine, since VS.NET just includes the Framework SDK installation.

            Microsoft MVP, Visual C# My Articles

            P 1 Reply Last reply
            0
            • H Heath Stewart

              Why go to all that trouble to execute aximp.exe or any SDK utility for that matter? Simly add "C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin" to your PATH environment variable in your System control panel. This environment variable is used to resolve executable paths when you run a problem. If it exists in the PATH, you don't need to type the full path to the executable file. It's also used by the executable loader to locate DLLs that need to be mapped into the process space. While you're at it, also add the Framework directories (ex: "C:\Windows\Microsoft.NET\Framework\v1.1.4322" so you can use the compilers and the assemblier without typing the full path. Do this for a good developer workstation setup. I make great use of it because I really don't use VS.NET for most code samples. And Nick is right, you don't need VS.NET for the Framework SDK. The .NET Framework SDKs are freely downloadable installations separate from the Framework installations that provide everything you find in "C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK" on your machine, since VS.NET just includes the Framework SDK installation.

              Microsoft MVP, Visual C# My Articles

              P Offline
              P Offline
              Peter Nirschl
              wrote on last edited by
              #6

              You are rigth! Sorry... :~ :~

              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