Questions tagged [managed]

Managed refers to code that requires and will only execute under the control of a Common Language Runtime (CLR). Any code written in C# or Visual Basic .NET is managed code.

890 questions
-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 use native c++ template class in c++/cli

I have a native c++ dll which contains some templates classes. And I need this dll in my c# code. So I am using managed c++ for the c++ dll in order to use it in the c# code, but I have a big problem on how using the template classes in…
LiGO
  • 11
  • 1
-1
votes
1 answer

.NET SIMD adding byte and ushort array

There is a long byte array which needs to be added to the destination array of type short. The solution can be found here: SEE byte + short. I am trying to do this using managed SIMD which lacks the support of "unpack" instruction (needed for…
dajuric
  • 2,373
  • 2
  • 20
  • 43
-1
votes
1 answer

creating instance for a class in a dll

How can I create an instance for a class in c# dll that I imported in a c++ project? I have imported the c# library to c++ by following the instructions given here. I can call the functions using the public interface. [EDIT] I want to set values for…
Fresher
  • 493
  • 6
  • 18
-1
votes
1 answer

P/Invoke and memory related intermittent crash

I've implemented this APIs some time ago and everything was working quite well until some weeks ago when I noticed it, The intermittent crash, the famous Marshaling related in .NET "Attempted to read or write protected memory. This is often an…
Allegro07
  • 1
  • 1
-1
votes
1 answer

C++ function trigger C# function

Basically my code is looks like below Managed.dll Managed.cs class MyManagedClass { public ShowMessage() { System.out.println("My Message"); } } Wrapper.dll ref class Wrapper { }; Native.lib class NativeClass { public: void…
ravikumar
  • 89
  • 1
  • 1
  • 3
-1
votes
3 answers

Limit scope in Node JS

I want to let users create custom plugins for one of my apps Programmed in Node JS. I thought of using some method similar than dynamic libraries, but using Node Modules. The problem is don't want the users to be able to do harmful things like…
Pablo
  • 456
  • 2
  • 7
  • 18
-1
votes
1 answer

Debugger hangs when performing a native DLL call from referenced managed Assembly

My C# project is referencing managed dll that has dependencies on a native dll. Therefore, before calling managed dll function I copy native dll to folder: Path.GetDirectoryName(Assembly.GetAssembly(typeof(ManagedDllClass)).Location). I'm still,…
-1
votes
1 answer

Unmanaged Dll call und Pinning of Managed Objects

I have three unmanaged dll functions: void Init(){} void Run(){} void Done(){} They work with the same managed object. Init() function inits the object, Run() uses it and Done() clears it. My main question is: Is it necessary to use…
Creator
  • 135
  • 11
-1
votes
3 answers

C++ mangaged class and c#

I have two managed c++ classes . Which is used to communicate with i2C device. I need to use them in c#. i have 2 ".h" files which have source and declaration. Do I need to convert it to c# or if I am creating a DLL from that how can I do that?…
Zigma
  • 529
  • 6
  • 37
-2
votes
1 answer

How to use a struct defined in C++ CLR in unmanaged C++?

I have a struct defined in Managed.h and I would like to be able to use it inside a different project, which is unmanaged C++ (let's call it Unmanaged.h). I tried referencing the dll, a few different #includes, but I couldn't make it work. Is there…
Olivier Giniaux
  • 870
  • 2
  • 8
  • 22
-2
votes
1 answer

In managed C++ how to define generic method that returns a value of specified type

I am trying to declare an equivalent of this code in c#: public T FieldValueOrDefault(int columnIndex); I am using managed C++ Visual Studio 2015. If it matters, Target Platform Version is set to 8.1 and CLR Support set to /clr. When I enter…
Andrey Belykh
  • 2,578
  • 4
  • 32
  • 46
-2
votes
1 answer

C++/CLR (C++ Interop) Basic Questions :)

I've some questions about C++/CLR C++ Interop (basically mixing C++ unmanaged and managed code). If I create an application with C++/CLR and I write unmanaged and managed code, for example: int main(int argc, char*argv[]) { int a = 30; …
-2
votes
1 answer

members of class being overwritten when new instance created c++/cli

I have tried to implement the following: 1) Create a class that contains managed arrays 2) Create three instances of this class 3) Fill those arrays from three different data files. 4) Perform an analysis of this data I have been able to compile…
-2
votes
1 answer

Windows Forms: Unmanaged code calls an internal thread that causes 'Access violation'

So I'm using some native code (only access to the DLLs; no source code) that causes my program to crash. Essentially, I try to connect to a server which initially connects fine. There is a connection object provided by the API which is used as the…
furssher
  • 83
  • 8
1 2 3
59
60