Sam,
From the perspective of a .NET developer, managed code does in fact equal
..NET code, and unmanaged code is all code that does not run under the CLR.
However, Java bytecode is often referred to as "managed code" as well. By
this more generic definition, managed code is any code that is run in a
managed environment that controls security access and access to resources.
That managed environment might be .NET's Common Language Runtime, Java's
bytecode interpreter, or something else. It is not enough for the code to
require a supporting runtime; VB6 or FoxPro executables, for example, are
not "managed" in this sense. A support library full of routines is
passively called by such code; but unlike a suport library, a manged
environment may refuse application an request if it violates security
protection levels or accesses forbidden resources. In order to be able to
determine whether or not to honor requests, the application code must be
self-describing; hence the other requirement to call an execution
environment "managed."
So, generically, managed code (1) contains some kind of meta-data to
describe itself to its runtime environment with (2) actively grants or
denies application requests based on the defined security configurations for
the application, and the machine and network the application is interacting
with.
--Bob
"Sam Gentile [MVP - C#/.NET]" <no****@nomail.com> wrote in message
news:u$**************@TK2MSFTNGP09.phx.gbl...
Thanks. So is recreating the structs into C#-readable structs (class or
struct) marshalling?
Unmanaged code is simply all code pre .NET.