Difference between .dll and .exe?

I don’t know why everybody is answering this question in context of .NET. The question was a general one and didn’t mention .NET anywhere. Well, the major differences are: EXE An exe always runs in its own address space i.e., It is a separate process. The purpose of an EXE is to launch a separate … Read more

How to get the location of the DLL currently executing?

You are looking for System.Reflection.Assembly.GetExecutingAssembly() string assemblyFolder = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string xmlFileName = Path.Combine(assemblyFolder,”AggregatorItems.xml”); Note: The .Location property returns the location of the currently running DLL file. Under some conditions the DLL is shadow copied before execution, and the .Location property will return the path of the copy. If you want the path of the original … Read more

How to identify if the DLL is Debug or Release build (in .NET) [duplicate]

IMHO, The above application is really misleading; it only looks for the IsJITTrackingEnabled which is completely independent of whether or not the code is compiled for optimization and JIT Optimization. The DebuggableAttribute is present if you compile in Release mode and choose DebugOutput to anything other than “none”. You also need to define exactly what … Read more

How to copy DLL files into the same folder as the executable using CMake?

I’d use add_custom_command to achieve this along with cmake -E copy_if_different…. For full info run cmake –help-command add_custom_command cmake -E So in your case, if you have the following directory structure: /CMakeLists.txt /src /libs/test.dll and your CMake target to which the command applies is MyTest, then you could add the following to your CMakeLists.txt: add_custom_command(TARGET … Read more

How to make Visual Studio copy a DLL file to the output directory?

Use a post-build action in your project, and add the commands to copy the offending DLL. The post-build action are written as a batch script. The output directory can be referenced as $(OutDir). The project directory is available as $(ProjDir). Try to use relative pathes where applicable, so that you can copy or move your … Read more

How do I safely pass objects, especially STL objects, to and from a DLL?

The short answer to this question is don’t. Because there’s no standard C++ ABI (application binary interface, a standard for calling conventions, data packing/alignment, type size, etc.), you will have to jump through a lot of hoops to try and enforce a standard way of dealing with class objects in your program. There’s not even … Read more

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