unmanaged

Database Access Libraries for C++

孤人 提交于 2019-12-20 10:08:30
问题 Background: I have an application written in native C++ which uses the wxWidgets toolkit's wxODBC database access library which is being removed from all future versions of wxWidgets . I need to replace this with another database access method that supports the assumptions and contraints outlined below. I don't require that the replacement use native DBMS APIs or ODBC under the hood, but it must meet the contraints outlined below. Assumptions/Constraints The library must: Support Native (i.e.

Can nunit-console list all test names in a test fixture?

痞子三分冷 提交于 2019-12-19 19:38:06
问题 I'd like to report them before they're run, and have the option to run individual tests through shell scripts without managing categories. We have some unmanaged code which can leave the process in a bad state, and sometimes are happy to run each test individually per nunit-console run. 回答1: There is now the --explore command-line option that can be used to list all test cases without running tests. More specifically nunit3-console.exe MyProject.dll --explore For more info: https://github.com

OpenCV Unmanaged DLLs not found asp.net

一个人想着一个人 提交于 2019-12-19 19:14:10
问题 We are building a web application (C# .NET) that uses unmanaged libraries in the form of the Emgu opencv wrapper. We are forcing the build to be in 32-bit (x86), and we are using the 32-bit version of Emgu. All this works nice on local builds, but when being published to our webserver the openCV Dll(s) fail to load: System.DllNotFoundException Unable to load DLL 'opencv_core240': The specified module could not be found. (Exception from HRESULT: 0x8007007E) System.TypeInitializationException:

OpenCV Unmanaged DLLs not found asp.net

吃可爱长大的小学妹 提交于 2019-12-19 19:13:17
问题 We are building a web application (C# .NET) that uses unmanaged libraries in the form of the Emgu opencv wrapper. We are forcing the build to be in 32-bit (x86), and we are using the 32-bit version of Emgu. All this works nice on local builds, but when being published to our webserver the openCV Dll(s) fail to load: System.DllNotFoundException Unable to load DLL 'opencv_core240': The specified module could not be found. (Exception from HRESULT: 0x8007007E) System.TypeInitializationException:

C# component events?

走远了吗. 提交于 2019-12-19 11:19:28
问题 I am attempting to write a C# component which will expose events. The component is to be imported by an unmanaged C++ application. According to a few tutorials I have come up with this code (for the C# side): namespace COMTest { [ComVisible(true), Guid("02271CDF-BDB9-4cfe-B65B-2FA58FF1F64B"), InterfaceType(ComInterfaceType.InterfaceIsIDispatch)] public interface ITestEvents { void OnTest(); } [ComVisible(true), Guid("87BA4D3A-868E-4233-A324-30035154F8A4")] public interface ITest { void

C# deallocate memory referenced by IntPtr

北战南征 提交于 2019-12-19 05:33:47
问题 I am using some unmanaged code that is returning pointers (IntPtr) to large image objects. I use the references but after I am finished with the images, I need to free that memory referenced by the pointers. Currently, the only thing that frees the memory is to shutdown my entire app. I need to be able to free that memory from inside my application. Here is the call to that allocates the memory. hbitmap is the pointer that is returned and needs to be deallocated. [DllImport("twain_32.dll",

Easyhook 32 bit application

笑着哭i 提交于 2019-12-18 18:05:35
问题 I'm using EasyHook to intercept registry calls. In more detail, I use RegQueryValue to intercept the call that reads a key from registry and change its value with something else. The relevant code looks like: [UnmanagedFunctionPointer(CallingConvention.StdCall, CharSet = CharSet.Unicode, SetLastError = true)] delegate int DRegQueryValueExW( IntPtr hKey, string lpValueName, int lpReserved, ref Microsoft.Win32.RegistryValueKind lpType, StringBuilder lpData, ref int lpcbData); [DllImport(

Easyhook 32 bit application

雨燕双飞 提交于 2019-12-18 18:05:04
问题 I'm using EasyHook to intercept registry calls. In more detail, I use RegQueryValue to intercept the call that reads a key from registry and change its value with something else. The relevant code looks like: [UnmanagedFunctionPointer(CallingConvention.StdCall, CharSet = CharSet.Unicode, SetLastError = true)] delegate int DRegQueryValueExW( IntPtr hKey, string lpValueName, int lpReserved, ref Microsoft.Win32.RegistryValueKind lpType, StringBuilder lpData, ref int lpcbData); [DllImport(

Calling a .net dll from delphi2006 to show a wpf form

天涯浪子 提交于 2019-12-18 13:48:29
问题 I'm using Robert Gieseckes great Unmanaged Exports to call a c#-Dll from Delphi2006. All works well if I use simple procedures and functions with input and output. But now I would like to show a Wpf-Window via the call to OpenMyWindow(). Here I get an "External Exception E0434352". I have no idea why this is not working. Anyway I think it has something to do with Initialization on the wpf side. Here is the Delphi Code: unit Unit2; interface uses Windows, Messages, SysUtils, Variants, Classes,

Including headers from an unmanaged C++ code inside C++/CLI code

五迷三道 提交于 2019-12-18 09:45:16
问题 I'm writing a CLR wrapper for an unmanaged C++ library. There are two files I'm including from the unmanaged lib: //MyCLIWrapper.h #include "C:\PATH\TO\UNMANAGED\Header.h" #include "C:\PATH\TO\UNMANAGED\Body.cpp" Then I'm writing CLI implementations for the unmanaged library functions: //MyCLIWrapper.h // includes ... void MyCLIWrapper::ManagedFunction() { UnmanagedFunction(); // this function is called successfuly } However, if my Unmanaged function contains calls to other functions that are