Merge DLL into EXE?

For .NET Framework 4.5 ILMerge.exe /target:winexe /targetplatform:”v4,C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0″ /out:finish.exe insert1.exe insert2.dll ILMerge Open CMD and cd to your directory. Let’s say: cd C:\test Insert the above code. /out:finish.exe replace finish.exe with any filename you want. Behind the /out:finish.exe you have to give the files you want to be combined.

Application failed to start because it could not find or load the QT platform plugin “windows”

The error is caused because the program can’t find qwindows.dll qwindows.dll has to be in a folder named platforms so that the path from your executable to the dll is platforms/qwindows.dll Whereas this wasn’t enough in my case. I had also to add following line at the beginning of my main() QCoreApplication::addLibraryPath(“./”); Then everything worked.

Python Ctypes – loading dll throws OSError: [WinError 193] %1 is not a valid Win32 application

Mentioning [Python.Docs]: ctypes – A foreign function library for Python (although this doesn’t have very much to do with it) just in case. The underlying error is ERROR_BAD_EXE_FORMAT (193, 0xC1). Check it in [MS.Docs]: System Error Codes (0-499). It’s a general Win error (not related to Python). In the current case (related to Python), the … Read more

java.lang.UnsatisfiedLinkError no *****.dll in java.library.path

In order for System.loadLibrary() to work, the library (on Windows, a DLL) must be in a directory somewhere on your PATH or on a path listed in the java.library.path system property (so you can launch Java like java -Djava.library.path=/path/to/dir). Additionally, for loadLibrary(), you specify the base name of the library, without the .dll at the … Read more

Why do 64-bit DLLs go to System32 and 32-bit DLLs to SysWoW64 on 64-bit Windows?

I believe the intent was to rename System32, but so many applications hard-coded for that path, that it wasn’t feasible to remove it. SysWoW64 wasn’t intended for the dlls of 64-bit systems, it’s actually something like “Windows on Windows64”, meaning the bits you need to run 32bit apps on a 64bit windows. This article explains … Read more

Dynamically load a function from a DLL

LoadLibrary does not do what you think it does. It loads the DLL into the memory of the current process, but it does not magically import functions defined in it! This wouldn’t be possible, as function calls are resolved by the linker at compile time while LoadLibrary is called at runtime (remember that C++ is … Read more