dll

Faulting module what does this mean and why does this happen?

丶灬走出姿态 提交于 2019-12-23 22:18:57
问题 I have an apllication written in .net C# and it sporafdically crashes (not responding) the windows event log ahd the following message. (teh dll it refers to is unmanaged code) does anyone know what does this exception mean? what might cause this? and what are the ways to solve this? Faulting application name: Application.exe, version: 4.2.11.0, time stamp: 0x4e8d8e86 Faulting module name:myDll.DLL_unloaded, Exception code: 0xc0000005 Fault offset: 0x0000000180004d3c Faulting module path:

Visual C++ Release build - is string getting corrupted when passed across DLL because compiled with different runtime version?

[亡魂溺海] 提交于 2019-12-23 20:39:38
问题 After building in Release mode, I am seeing exceptions which didn't occur in Debug mode. When debugging the release build, it looks like string references are not being passed correctly from the EXE (our application) to the DLL which is receiving the string reference. Our EXE code looks like this: string contents = "handle_message(): received=" + msg->encode(); LOG4CXX_DEBUG(logger, contents); The LOG4CXX_DEBUG is going to log4cxx.dll , whose code looks like this: CharMessageBuffer&

Calling C++ code from C# error using references in c++ ref in c#

只谈情不闲聊 提交于 2019-12-23 20:32:52
问题 So in my c++.dll file i got the following function: DLL void GetUserPass(char* &userName, char* &passWord) { userName = "ceva"; passWord = "altceva"; } Now I want to call this from c# but it gives me an error: [DllImport("myDLL.dll")] private static extern void GetUserPass(ref string userName, ref string passWord); static void f() { string userName =""; string passWord =""; GetUserPass(ref userName, ref passWord); } And the error is: A call to PInvoke function 'Download FTP Archive!Download

NuGet restoring packages but missing DLLs

狂风中的少年 提交于 2019-12-23 19:57:02
问题 I've had a Visual Studio solution running successfully on my machine but when I've committed the changes to BitBucket and another user has pulled down the project and built it on either Visual Studio or TeamCity we've received errors such as: error CS0234: The type or namespace name 'Entity' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) When I've looked at the project, I can see that each NuGet package folder is present but the DLLs are missing. This

How to deterimine whether .Net DLL is used in a GUI app or web service?

痞子三分冷 提交于 2019-12-23 18:53:28
问题 How do I determine in a .Net DLL whether it's running in a Windows GUI application or web service? I've got a low level class which is being shared between two applications and need to disable message boxes when it's used in a web service. The Windows application has over 200 solutions and I'm not in a position to re-factor the existing code. The web service needs to reuse some functionality and I'm looking for a quick fix. 回答1: Just a piece of general advice, your low level class should

How to pass address of objects created in a C# List to C++ dll?

怎甘沉沦 提交于 2019-12-23 18:38:13
问题 I have been looking all over google to find some answers to my questions but do not quite understand what I have found. I have some objects which are created and stored in C# List after using System.IO to read some text files. After that, I want to send references (using const pointers) to each of these objects to the internal classes in C++ dll so that it can use them for computation of some algorithms. Here are some simple example (not actual code) of what I am doing: The C# class:

Referencing an x64 dll file works in C# but does not work in F#

空扰寡人 提交于 2019-12-23 18:32:24
问题 I have created two brand new solutions using the latest VS 2010: C# console application F# console application I have referenced two x64 dll files: Kitware.VTK.dll and Kitware.mummy.Runtime.dll (can be downloaded here: http://www.kitware.com/products/avdownload.php ) The C# VS 2010 finds the namespace when I write using Kitware . The F# VS 2010 does not find the namespace when I write open Kitware . The x86 version works fine in F#. Any idea why is that and how to make the Kitware x64 work in

Get the DLL-file for a COM-Object without using CLSID and registry in c++

一世执手 提交于 2019-12-23 18:14:51
问题 Is it possible to get the DLL-filename for a loaded COM-Object without using the CLSID and a registry lookup? I have an IUnknown or in my case an IBaseFilter interface pointer and now I want to get the DLL-filename who created this COM-Object. Can I use the object point adress to reverse lookup the loaded module where it was created? And then get the HMODULE to use it in GetModuleFileName . 回答1: Only using some hacks, naturally. The object itself is on the heap, which is shared, but you could

Are Win32 applications automatically linked against ntdll.dll?

戏子无情 提交于 2019-12-23 17:46:52
问题 I've just found out by accident that doing this GetModuleHandle("ntdll.dll") works without a previous call to LoadLibrary("ntdll.dll") . This means ntdll.dll is already loaded in my process. Is it safe to assume that ntdll.dll will always be loaded on Win32 applications, so that a call to LoadLibrary is not necessary? 回答1: From MSDN on LoadLibrary() (emphasis mine): The system maintains a per-process reference count on all loaded modules. Calling LoadLibrary increments the reference count.

C# importing C++ dll

ぃ、小莉子 提交于 2019-12-23 17:32:09
问题 I have a managed dll file which imports functions from a C++ dll to the managed environment. I'm using some of its functions in my program but the problem is, I get this error when I use it: Unable to load DLL 'Libraries\lib.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) I placed the .dll file in the program's directory and in the system32 folder. However, it still doesn't work. I think I have to use DLLImport but I have no idea how to use it.. even after