tagged [unmanaged]
C#: Converting String to Sbyte*
C#: Converting String to Sbyte* My C# code uses a Managed C++ Wrapper. To make a new object of this Wrapper's type, I need to convert String's to Sbyte*'s. A few StackOverflow.com posts discussed how ...
Embedding unmanaged dll into a managed C# dll
Embedding unmanaged dll into a managed C# dll I have a managed C# dll that uses an unmanaged C++ dll using DLLImport. All is working great. However, I want to embed that unmanaged DLL inside my manage...
Managed C++ to form a bridge between c# and C++
Managed C++ to form a bridge between c# and C++ I'm a bit rusty, actually really rusty with my C++. Haven't touched it since Freshman year of college so it's been a while. Anyway, I'm doing the revers...
What advantages are there to developing a Win32 app in C++ over a .NET app in C#?
What advantages are there to developing a Win32 app in C++ over a .NET app in C#? I learned windows programming using Visual C++, and the Win32 API. Nowadays, it seems most apps are being developed in...
- Modified
- 18 Feb at 20:11
dealing with an unmanaged dll with a memory leak
dealing with an unmanaged dll with a memory leak I have a c# application that depends on a third-party unmanaged assembly to access certain hardware. The unmanaged code has a memory leak that will inc...
- Modified
- 6 May at 16:58
A call to PInvoke function '[...]' has unbalanced the stack
A call to PInvoke function '[...]' has unbalanced the stack I'm getting this weird error on some stuff I've been using for quite a while. It may be a new thing in Visual Studio 2010 but I'm not sure. ...
How to send a string by reference to an unmanaged C library that modifies that string?
How to send a string by reference to an unmanaged C library that modifies that string? I am new to the world of interacting with unmanaged libraries. I have an unmanaged C function that modifies a str...
Unload a .NET DLL from an unmanaged process
Unload a .NET DLL from an unmanaged process I'm extending my Inno-Setup script with code that I can best implement in C# in a managed DLL. I already know how to export methods from a managed DLL as fu...
- Modified
- 20 May at 08:16
Pinning an updateble struct before passing to unmanaged code?
Pinning an updateble struct before passing to unmanaged code? I using some old API and need to pass the a pointer of a struct to unmanaged code that runs asynchronous. In other words, after i passing ...
Using C# extension methods from managed C++/CLI
Using C# extension methods from managed C++/CLI Forgive me if my terminology is a little off. My knowledge of managed C++/CLI is very limited. I have an MFC application that uses a dll with the /clr o...
How do I add a reference to an unmanaged C++ project called by a C# project?
How do I add a reference to an unmanaged C++ project called by a C# project? One solution (the.sln) One C++ project (mycppproject.vcxproj in 2010or mycppproject.vcproj in 2008) which compiles a native...
- Modified
- 1 Sep at 16:6
CallbackOnCollectedDelegate was detected
CallbackOnCollectedDelegate was detected I am subclassing an application. My subclassed Window procedure is within a DLL. My subclassing code inside the DLL looks somewhat like this (stripped down, re...
WinApi - GetLastError vs. Marshal.GetLastWin32Error
WinApi - GetLastError vs. Marshal.GetLastWin32Error But I found no disadvantages of those 2! But see the accepted answer. --- I read [here](http://blogs.msdn.com/b/adam_nathan/archive/2003/04/25/56643...
- Modified
- 18 Jul at 09:14
How is it that a struct containing ValueTuple can satisfy unmanaged constraints, but ValueTuple itself cannot?
How is it that a struct containing ValueTuple can satisfy unmanaged constraints, but ValueTuple itself cannot? Consider the following types: - `(int, int)`- `struct MyStruct { public (int,int) Value; ...
How to serialize byte array to XML using XmlSerializer in C#?
How to serialize byte array to XML using XmlSerializer in C#? Say we have a struct that it's data is provided by un-managed byte array using Marshal.PtrToStructure. The C# struct layout: ``` [StructLa...
- Modified
- 23 May at 12:17
How to instance a C# class in UNmanaged memory? (Possible?)
How to instance a C# class in UNmanaged memory? (Possible?) --- First let me preface my question by stating that I'm a game developer. There's a legitimate - if highly unusual - performance-related re...
- Modified
- 23 May at 11:47
ServiceStack + 3rd Party COM Inteop + Context disconnected exception
ServiceStack + 3rd Party COM Inteop + Context disconnected exception I'm getting Context Disconnected errors when testing my ServiceStack service. I assume it's due to failing race conditions between ...
- Modified
- 20 Jun at 09:12
P/Invoke to dynamically loaded library on Mono
P/Invoke to dynamically loaded library on Mono I'm writing a cross-platform .NET library that uses some unmanaged code. In the static constructor of my class, the platform is detected and the appropri...
Minimum C# code to extract from .CAB archives or InfoPath XSN files, in memory
Minimum C# code to extract from .CAB archives or InfoPath XSN files, in memory Lately I've been trying to implement some functionality which extracts files from an InfoPath XSN file (a .CAB archive). ...