Questions tagged [unmanaged]

Unmanaged refers to Windows code that is independent of the Common Language Runtime(CLR). COM components, ActiveX components, and Win32 API functions are examples of unmanaged code.

1488 questions
0
votes
1 answer

DLL Not Found after using ILMerge

After screwing my head several times over with SQLite causing havok on some machines, I stumbled across a 'Managed Only' version of the library. http://sourceforge.net/projects/sqlite-dotnet2/files/SQLite%20for%20ADO.NET%202.0/1.0.66.0/ I got…
Chris Watts
  • 6,197
  • 7
  • 49
  • 98
-1
votes
2 answers

Create instance of unmanaged dll class

How do I create a class that I can reference to and directly use to call methods from an unmanaged dll? (assuming an unmanaged dll is a dll that doesn't exists/is known @ compile time) For example I have a dll which contains the class helloWorld and…
John
  • 1,095
  • 3
  • 15
  • 31
-1
votes
1 answer

C# how to look for class with unmanaged resource?

So... I usually deal with the comfy managed code side of C#, but now I have to add finalizer for any class with unmanaged resource. I read about finalizer and IDisposable already, but I don't really know all the various numerous different ways to…
ill mg
  • 331
  • 4
  • 8
-1
votes
3 answers

Unmanaged code calling causes a WCF process to crash

I have a class which includes managed code calling to unmanaged code via C++\CLI wrapper. Where running the class in a console application produces no errors. But when I wrapped it up with a WCF service the application crashes when the code reaches…
DoronBM
  • 515
  • 1
  • 6
  • 17
-1
votes
1 answer

How do I implement an interface from COM in C#

[NOT A DUPLICATE, I've searched for solutions for days and had performed a lot of tests only to find nothing really helps. That's why I registered stackoverflow and posted this.] [SITUATION] I am trying to perform COM interops in C# but I'm not…
Qiu
  • 1
  • 1
-1
votes
2 answers

Importing an unmanaged dll and copying the pointer to a byte array in c#

I'm trying to import some unmanaged ada code into C# and copy it into a byte array with Marshal Copy, however I am getting a System.AccessViolationException. Do you have any ideas why this is the case. [DllImport(@"Interpreter.dll", EntryPoint =…
kev0h1
  • 25
  • 5
-1
votes
1 answer

Post-mortem analysis of Windows Embedded Compact (Windows CE) program

We have an unmanaged C++ application (MFC framework, Windows CE) that closes on us at seemingly random moments. There is no error message and no C++ exception, it just vanishes. I presume something bad must have happened and the C run-time or OS…
E. van Putten
  • 615
  • 7
  • 17
-1
votes
1 answer

Creating an object of public ref class using new and gcnew

I have a class declared in MyRefClass.h public ref class MyRefClass{ .... .... }; What is the difference between where/how the three objects are allocated and managed? // This is allocated in **C++/CLI**. MyRefClass ^mrc = gcnew…
abhi4eternity
  • 448
  • 3
  • 8
  • 19
-1
votes
1 answer

How to represent System.double in unmanaged C++?

I'm writing a standalone app for Solidworks using API in Unmanaged C++ and facing some kind of a problem. There're methods for obtaining annotations' position coordinates on the drawing sheet - IGetPosition and GetPosition. Both a stated to have…
Sergey Kolesnik
  • 3,009
  • 1
  • 8
  • 28
-1
votes
1 answer

Passing a struct pointer in C# interop results in NULL

I am building a managed DLL for use in unmanaged environment (C/C++ app - FreeRDP). Interop works fine in most cases, but in one particular I am not able to pass a pointer to struct. In the API I have a struct: typedef struct _IWTSListenerCallback…
-1
votes
1 answer

How to use an unmanaged DLL in VS installer project, but without the user needing admin rights?

I'm creating an installer for a C# project. It requires an unmanaged 3rd party C++ dll to connect to a hardware device. When I run the project from the debugger, or when I right click -> Run as Administrator on the installed program, everything…
zakparks31191
  • 919
  • 2
  • 21
  • 42
-1
votes
1 answer

calling convention when using 64bit unmanaged callback

I have an unmanaged handler used in C# code, the delegate is defined like [UnmanagedFunctionPointer(CallingConvention.StdCall)] public delegate int Callback (arguments) It works well in 32bit version and I'm asking me what changes have to be done…
user5493558
  • 92
  • 1
  • 7
-1
votes
1 answer

Accessing Unmanaged Array in C++/CLI

My main program is written in C++/CLI (managed). The API for some of my hardware is contained in a .C file. From my main program I call the main() for the unmanaged c code which creates an array and works with the hardware. Once completed it…
Matt
  • 11
  • 1
-1
votes
1 answer

How to dynamically load correct version of 3rd party unmanaged control in c#

My app is a c# plug in to a 3rd party unmanaged app. I have a windows form with one of their controls (an AxInterop) that depends on one of their unmanaged dlls. Their 2015 version of the same control depends on a different type library file (eg.…
Perry
  • 1
  • 3
-1
votes
2 answers

I wish to wrap a DLL in C#

The System.Windows.Forms.dll I wish to wrap a few functions in this file in a C# class. Specifically these: https://msdn.microsoft.com/en-us/library/system.windows.forms.cursor(v=vs.110).aspx But I'm not sure how to get a list of functions. I've…