dll file reference not working in client computer vb.net application - vb.net

I have added zkemkeeper.dll reference in vb.net application. It is working in my computer but when i try to run in client computer it does not work. I copied and paste zkemkeeper.dll in system32 folder and also in same folder where exe file is located but still it is not working.
When i try to open the form of vb application which contain zkemkeeper class it gives error.

Sounds like zkemkeeper.dll is unmanaged, COM dll. You probably have to register it using regsvr32.dll. It doesn't matter where it resides, as long as you register it. Would be helpful if you would post the error you get.
And yes here is exactly what you asked for http://www.zktechnology.eu/index.php/faq-category/sdk/registering-sdk
How to use regsvr32.dll http://support.microsoft.com/kb/249873

Related

VB.net: exe file doens't work properly when called from Process.Start(...)

I am using VB.net.
I have problem with this command: Process.Start(System.Configuration.ConfigurationManager.AppSettings("ALL_ORACLEINTERFACEFILE"))
In appsetting of web.config, we found:
The problem is like this: Basically, SMSToOracleInterface.exe does two tasks:
Create a files in a local folder
Copy the files to a folder on Server.
When I double click the exe file directly, it worked well. However, when I run the web application (the application that contain Process.Start...), it did only the 1st task. 2nd task is not done at all.
Really appreciate your help.
The answer is that when we click .exe file to run, it get my window credentials to access the folder on server. Meanwhile, when we run from web application, it doesn't have credentials to access server.

Windows Script Host Object Model's Interop.IWshRuntimeLibrary.dll referencing same directory as executable

I have an application that creates desktop shortcuts. To do this I have to reference the Windows Script Host Object Model. When I add it as a reference, it always creates the DLL, Interop.IWshRuntimeLibrary.dll, in the obj\x86\Debug directory, then references itself to it, rather than looking at wshom.ocx. Even if I add reference wshom.ocx it reverts to saving the file in the obj\x86\Debug directory. The problem is if I move my application to another computer without that DLL being present, the program fails to run.
What's the proper way of handling this situation?
Thank you
Your best bet would be to ditch the Windows Scripting Host completely. Here's a link to a method for creating shortcuts without relying on the WSH. It still uses COM though.
http://vbaccelerator.com/home/NET/Code/Libraries/Shell_Projects/Creating_and_Modifying_Shortcuts/article.asp
Here is a class that someone created that you can use:
http://www.msjogren.net/dotnet/eng/samples/dotnet_shelllink.asp

Using a dll.config file for a dll in the GAC

Is it correct that mydll.dll which is located in the GAC will read mydll.dll.config from the the same path that it is effectively called from? As an example, if myprogram.exe runs in c:\test, all I need do is copy mydll.dll.config into c:\test and all will work OK?
In replies to a similar question, mention is made of setting the location of the config file via code using AppDomainSetup.ConfigurationFile. Given the dll is not a standalone executable, it doesn't have a load event or an entry point so where are you supposed to enter that code. I to presume that I can/must create a public static method that sets the location and that method must be called by my executable before actually using the dll?

Where should I place the DLL?

I downloaded an itextsharp DLL that I would like to use in my vb.net 2008 express application.
In which folder should it be placed?
I went into choose items in the toolbox and tried to add it but I got an error
This is what I downloaded:
http://sourceforge.net/projects/itextsharp/
You need to reference the DLL inside your project: right-click on the project in solution explorer and then select Add Reference and next select itextsharp.dll. It will then be automatically copied to the project output folder alongside with the executable (usually bin\Debug)
It shouldn't matter where the DLL is places. Download the correct compiled DLL to your computer.
Open your VB.NET solution -> Right Click -> Add Reference...
Browse your PC for the DLL you just downloaded and let Visual Studio do the rest.
Typicaly you put the dll in ANY directory and set up a reference to it. When compiling, VS adds this dll to the bin directory of the application automatically.
Something to keep in mind is that there are no objects from the DLL you can put in and use from the Toolbox; you need to programmatically create iTextSharp objects.
Like this:
Add Imports:
Imports iTextSharp.text.pdf
And in your code:
Dim writer As PdfWriter = PdfWriter.GetInstance(document, iostream)
Maybe it's better to copy the additional dll file inside your project, so that when you pull it again from git server, you don't need to copy it again.

Using Other Programmers Custom Controls

I am using Scott Mitchell's textBox Characters and Words counter control, i downloaded it from the website https://web.archive.org/web/20211020202742/https://www.4guysfromrolla.com/ and unzipped it to my desktop. then in VWD Express 2008, i created a new tab in the Toolbox, i chose the *.dll from the unzipped folder, i used the control, all is fine (try it, i recommend it) but when i backed up my code, copied the site, and tried to run it on another computer, i got a bunch of error all indicating that its looking for the dll file on my desktop, but when i checked under my bin folder in my website directory, the dll is there...
Help Plz...
If you view the properties of the reference you'll probably find that the path to the reference is incorrect.
I have often found that the quickest way of fixing the problem is to open the project file with notepad and correct the path to the reference.