Problem using Dll in .net
-
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
-
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
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
-
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
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! -
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!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 -
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!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
-
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
You are rigth! Sorry... :~ :~