Check if unmanaged DLL is 32-bit or 64-bit?

Refer to the specifications. Here’s a basic implementation: public static MachineType GetDllMachineType (string dllPath) { // See http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx // Offset to PE header is always at 0x3C. // The PE header starts with “PE\0\0” = 0x50 0x45 0x00 0x00, // followed by a 2-byte machine type field (see the document above for the enum). // … Read more

using ILMerge with .NET 4 libraries

There was a very recent release to solve x64 problems. Get in touch with Mike Barnett directly if you still have problems (mbarnett at microsoft dot com) Addendum. There’s something very, very wrong about your /lib:”C:\Windows\Microsoft.NET\Framework64\v4.0.30319″ option. This has been getting lots of programmers in trouble lately, after .NET 4.5 was released. That directory is … Read more

DLL References in Visual C++

You need to do a couple of things to use the library: Make sure that you have both the *.lib and the *.dll from the library you want to use. If you don’t have the *.lib, skip #2 Put a reference to the *.lib in the project. Right click the project name in the Solution … Read more

LNK4075: ignoring ‘/EDITANDCONTINUE’ due to ‘/OPT:ICF’ specification

You can either have “Edit and continue” support or optimizations. Usually, you put “Edit and continue” on debug builds, and optimizations on release builds. Edit and continue allows you to change code while you are debugging and just keep the program running. It’s not supported if the code also has to be optimized.

The program can’t start because cygwin1.dll is missing… in Eclipse CDT

This error message means that Windows isn’t able to find “cygwin1.dll”. The Programs that the Cygwin gcc create depend on this DLL. The file is part of cygwin , so most likely it’s located in C:\cygwin\bin. To fix the problem all you have to do is add C:\cygwin\bin (or the location where cygwin1.dll can be … Read more

Getting LibCurl to work with Visual Studio 2013

A lot of these instructions are out of date because they recommend the win32-ssl-devel-msvc package for curl, which no longer exists. The following instructions allow you to build libcurl using only: Visual Studio 2013 curl generic source tarball (tested on curl 7.44.0). A. Build libcurl static library Download the latest curl generic source from: http://curl.haxx.se/latest.cgi?curl=tar.gz … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)