While running my program, when i open the main window, i get a System.DllNotFoundException.
The complete exception i get from vs reads:
System.DllNotFoundException
HResult=0x80131524
Message=Die DLL "FTDIInterface.dll": Das angegebene Modul wurde nicht gefunden. (Ausnahme von HRESULT: 0x8007007E) kann nicht geladen werden.
Source=FTDILib
StackTrace:
at FTDILib.FTDID2XX_Interface.FTDI_Stop()
at FTDILib.SerialConnection.FTDISerial.Stop()
at FTDILib.SerialConnection.FTDISerial.Finalize()
i checked if the dll are in the correct directories.
Then i used
dumpbin /dependents FTDIInterface.dll
to check for dependencies and got two:
FTD2XX.dll and KERNEL32.dll
FTD2XX.dll exists in the same path as FTDIInterface.dll.
It has four other dependencies:
SETUPAPI.dll, KERNEL32.dll, USER32.dll and ADVAPI32.dll
All those exist in C:\Windows\system32 which i added to the refernce paths in the properties of my project.
Why do i get this exception and how may i fix it?
Thank you
I solved the problem by placing copies of FTDIInterface.dll and ftd2xx.dll in System32 and SysWOW64.
I can't help but think, that it is very strange that i have to place my custom library inside a system folder.
Any thoughts on the matter?
Related
I'm attempting to take a DLL that is not strongly named and then strongly name it without needing to have the source code, since I will not always have the source code, only the DLL. When I try and run the batch file with the below code to accomplish this I get an error. Here is the code:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.2 Tools\ildasm.exe" .\targetFile.dll /out:.\Signed\targetFile.il
"C:\Windows\Microsoft.NET\Framework\v2.0.50727\ilasm.exe" .\Signed\targetFile.il /dll /key=.\targetFile.snk /output=.\Signed\targetFile.dll
The error I get is the following:
.\Signed\targetFile.il(43) : error -- Failed to extract public key: 0x80070005
I'm not sure what I'm missing, I have permissions to all involved folders including the MacnineKeys folder in ProgramData.
While installing Visual Studio 2017 I encountered the error while downloading the JDKV2-Component for Xamarin (maybe someone could edit the English error message in?):
Paket "JavaJDKV2,version=1.8.2,chip=x86" konnte von "https://go.microsoft.com/fwlink/?linkid=863182" nicht heruntergeladen werden.
Such-URL
https://aka.ms/VSSetupErrorReports?q=PackageId=JavaJDKV2;PackageAction=DownloadPackage;ReturnCode=0x80072ee2
Details
WebClient-Download fehlgeschlagen: Timeout für Vorgang überschritten
Bits-Download fehlgeschlagen: Fehlerkontext: BG_ERROR_CONTEXT_REMOTE_FILE, Fehlercode: -2145844841
WinInet-Download fehlgeschlagen: Function: InternetOpenUrl, HR: -2147012894, Message: Unknown error 12002
Betroffene Workloads
Mobile-Entwicklung mit .NET (Microsoft.VisualStudio.Workload.NetCrossPlat,version=15.0.27128.1)
Mobile-Entwicklung mit C++ (Microsoft.VisualStudio.Workload.NativeMobile,version=15.0.27005.2)
Mobile-Entwicklung mit JavaScript (Microsoft.VisualStudio.Workload.WebCrossPlat,version=15.0.27019.1)
Betroffene Komponenten
Android SDK-Einrichtung (API-Ebene 23) (globale Installation) (Component.Android.SDK23,version=15.0.27128.1)
Android SDK-Setup (API-Ebene 19 und 21) (Component.Android.SDK19,version=15.0.27128.1)
Android SDK-Setup (API-Ebene 22) (Component.Android.SDK22,version=15.0.27128.1)
Google Android-Emulator (API-Ebene 23) (globale Installation) (Component.Google.Android.Emulator.API23.V2,version=15.0.27128.1)
Java SE Development Kit (8.0.1120.15) (Component.JavaJDK,version=15.0.26403.0)
Same for the x64-version of the JDK.
It turned out that the Oracle-Website needs a License-Accepted-cookie to download the files. While Microsoft seemingly tried to add it to the download routine it doesn't work for me and the installation won't proceed beyond the point where it tries to install the JDK.
So I downloaded the files manually. But where do I have to put them so that the Visual Studio installation knows that it won't need to download them again?
While searching the web for some hours I finally found the solution here:
https://developercommunity.visualstudio.com/content/problem/160625/packageidjavajdkv2packageactiondownloadpackageretu-5.html
Turns out you have to search for the following folder:
C:\ProgramData\Microsoft\VisualStudio\Packages
There you create a subfolder with the package name as written in the error message/error log (in my case "JavaJDKV2,version=1.8.2,chip=x86") and put the manually downloaded .exe file in there.
Restart the VS-installer and start the installation process.
when I try to open a project in VS 2015 I get the error "Access denied" on a File located in C:\Users\XY\AppData\Roaming\Microsoft\VisualStudio\14.0\FeedCache .
The german message is "C:\Users\XY\Documents\Visual Studio 2015\Projects\App1\App1\App1.csproj : error : Der Zugriff auf den Pfad "C:\Users\XY\AppData\Roaming\Microsoft\VisualStudio\14.0\FeedCache\Feed-969FF52C4894C164-File.xml" wurde verweigert."
Some hours ago I restarted my computer for system updates and immediately after that I installed the english language pack for VS.
So I navigated to that FeedCache folder. For that Folder I have all permissions an the security settings grant me al privileges even for inherited files and folders (screenshot). But when i, for example, try to rename a file inside that FeedCache folder, I get a access denied Message. So for me it seems to be a matter of wrong previlegs.
I've tried to disable Inheritance for the FeedCache Folder and the to re-enable it. But I get an error during enableing (screenshot).
Kim
I have the following problem:
I used to have a launch4j config to create a wrapped executable from my runable jar using a bundeled jdk/jre7 for quite some time.
The Programm (launched with that .exe) starts almost immediatly with jdk7.
I now had to switch to jdk8 which results in a VERY slow startup. Everything works just fine, that is not the problem, but the launch process of that .exe takes ~1-2 Minutes and I simply don't get why.
Starting the application from within eclipse (using the same JDK8) it starts within seconds again (as it should!).
So... Any ideas what might cause this and how I can fix it?
Here is my current l4j.xml:
<?xml version="1.0" encoding="UTF-8"?>
<launch4jConfig>
<dontWrapJar>false</dontWrapJar>
<headerType>gui</headerType>
<jar>C:\Users\user\workspace\DataUpdater\release\bin\DataUpdater-v2.6.1.jar</jar>
<outfile>C:\Users\user\workspace\DataUpdater\release\DataUpdater.exe</outfile>
<errTitle>DataUpdater: Kein kompatibles JRE gefunden</errTitle>
<cmdLine></cmdLine>
<chdir>.</chdir>
<priority>high</priority>
<downloadUrl>http://java.com/download</downloadUrl>
<supportUrl>https://www.google.de/</supportUrl>
<stayAlive>true</stayAlive>
<restartOnCrash>false</restartOnCrash>
<manifest></manifest>
<icon>C:\Users\user\workspace\DataUpdater\res\icons\DataUpdater.ico</icon>
<singleInstance>
<mutexName>DataUpdater v2.6.1</mutexName>
<windowTitle>DataUpdater v2.6.1</windowTitle>
</singleInstance>
<jre>
<path>./bundeled/jre1.8.0_92</path>
<bundledJre64Bit>true</bundledJre64Bit>
<bundledJreAsFallback>false</bundledJreAsFallback>
<minVersion>1.8.0</minVersion>
<maxVersion>1.8.0_92</maxVersion>
<jdkPreference>jdkOnly</jdkPreference>
<runtimeBits>64</runtimeBits>
<initialHeapPercent>33</initialHeapPercent>
<maxHeapPercent>80</maxHeapPercent>
<opt>-Dfile.encoding=UTF-8</opt>
</jre>
<versionInfo>
<fileVersion>2.6.1.0</fileVersion>
<txtFileVersion>v2.6.1</txtFileVersion>
<fileDescription>DataUpdater: Anwendung zum aktualisieren von -Datensätzen mittels externer Datenquellen wie Excel-Tabellen direkt auf Datenbankebene.</fileDescription>
<copyright>Max Mustermann</copyright>
<productVersion>2.6.1.0</productVersion>
<txtProductVersion>v2.6.1</txtProductVersion>
<productName>DataUpdater</productName>
<companyName>Max Mustermann</companyName>
<internalName>DataUpdater v2.6.1</internalName>
<originalFilename>DataUpdater.exe</originalFilename>
</versionInfo>
<messages>
<startupErr>DataUpdater konnte nicht gestartet werden. </startupErr>
<bundledJreErr>DataUpdater erwartet ein bundled JRE. Dieses wurde nicht gefunden oder ist beschädigt.</bundledJreErr>
<jreVersionErr>DataUpdater benötigt eine Java Laufzeitumgebung. Diese konnte nicht gefunden werden.
Bitte stellen Sie sicher, dass Java 8 auf Ihrem System installiert ist.</jreVersionErr>
<launcherErr>Die Windows Registry verweist auf eine nicht mehr vorhandene oder beschädigte Java Installation.</launcherErr>
<instanceAlreadyExistsMsg>DataUpdater wird bereits ausgeführt.
Es ist immer nur eine DataUpdater-Instanz gleichzeitig erlaubt.</instanceAlreadyExistsMsg>
</messages>
</launch4jConfig>
Edit:
The executable reacts the same on many different machines so it is not related to my local environment...
Additional Info:
I just noticed, that launching the application from the jar directly instead of the executable results in the same slow startup.
So this MUST be related to the jdk8 somehow and not to l4j.
What I do not understand is why it starts so fast from within eclipse using the same jdk8.
After a long research without any good result i noticed, that this "hang up" is not related to launch4j & Java 8 but related to log4j and Java 8.
Still not clear what excatly causes this but it is the topic of another question.
I have installed EmguCV 2.4.2.1777. I have a 32-bit windows 7 so I installed it using the installer. Now I am trying to write a simple code to capture a webcam's video in a window in C#.
The problem is after during execution I am getting the following famous error:
A first chance exception of type 'System.DllNotFoundException' occurred in Emgu.CV.dll
A first chance exception of type 'System.TypeInitializationException' occurred in Emgu.CV.dll
An unhandled exception of type 'System.TypeInitializationException' occurred in Emgu.CV.dll
The file Emgu.CV.dll is present in the folder. I don't understand why its giving that error.
I tried all the checks which are suggested by fellow stackoverflow users and also many other references:
1) Installed MSVCR: MSVCRT 10.0 SP1 x86
2) copied the OpenCV dlls to the execution directory
3) I also have a 32-bit OS. So that also should'nt be an issue.
But when I checked for dependencies, I faced a problem:
I used DependecyWalker to open cvextern.dll and found the following dependencies missing:
NVCUDA.DLL
API-MS-WIN-CORE-COM-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ERROR-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-ROBUFFER-L1-1-0.DLL
API-MS-WIN-CORE-WINRT-STRING-L1-1-0.DLL
API-MS-WIN-SHCORE-SCALING-L1-1-0.DLL
DCOMP.DLL
IESHIMS.DLL
It also gave the following:
Error: At least one required implicit or forwarded dependency was not found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
Please help me out with the exception. Thanks in advance.
I copied all the dll files from C:\Emgu\emgucv-windows-universal-gpu 2.4.9.1847\bin\x86 to a folder called includes in my project and updated the "Copy To Output Directory" Option for these DLLs to "Copy Always" and it got rid of this issue.