if i'm using .net dll from delphi code, by exporting types, will managed code have his own thread or it will work in delphis thread? or i must create thread in dll, if i want it to work in new thread?
i want to call .net function, from unmanaged code. and i want it to work async.
Managed code is the one that is executed by the CLR of the . NET framework while unmanaged or unsafe code is executed by the operating system. The managed code provides security to the code while undamaged code creates security threats.
Managed code is computer program code that requires and will execute only under the management of a Common Language Infrastructure (CLI); Virtual Execution System (VES); virtual machine, e.g. . NET, CoreFX, or . NET Framework; Common Language Runtime (CLR); or Mono. The term was coined by Microsoft.
The Key Difference between Managed and Unmanaged code is that Managed Code is byte code executed by a virtual machine like the . NET CLR engine. While Unmanaged code is like the C++ code output as natural OS Hardware dependent binary code executed by the Hardware machine directly.
Managed code is a code whose execution is managed by Common Language Runtime. It gets the managed code and compiles it into machine code. After that, the code is executed. The runtime here i.e. CLR provides automatic memory management, type safety, etc.
The managed code will not get any new thread automatically. You need to spin of a thread yourself and call the managed code on that thread.
Of course you can use threads internally in the .NET code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With