From Unmanaged, unsafe to Managed, safe...

S

SpotNet

Hi Newsgroup,

General C# questions. If I have a class(es), of API functions just as they
are. Would that be considered Unmanaged or unsafe (not meant as the c#
keyword) code? If I implement error checking, and disposing appropriate
resources for those functions would my program then be considered managed
(or safe)?

In general I'd like to ask (not just with API functions) can you construct
an assembley that would confirm to the definition (I don't really know it)
of Managed code with respect to the .NET Framework, from using unmanaged
resources? So that if you passed that assemebley to someone else, you could
say, it's managed and hence safe. If it can, what guide lines should be
followed?

SpotNet
 
V

Vadym Stetsyak

Code executing under the control of the runtime is called managed code.
Conversely, code that runs outside the runtime is called unmanaged code. COM
components, ActiveX interfaces, and Win32 API functions are examples of
unmanaged code. Runtime here is called Common Language Runtime ( CLR )
 
S

SpotNet

Thank you very much Vadym.

SpotNet

Vadym Stetsyak said:
Code executing under the control of the runtime is called managed code.
Conversely, code that runs outside the runtime is called unmanaged code.
COM
components, ActiveX interfaces, and Win32 API functions are examples of
unmanaged code. Runtime here is called Common Language Runtime ( CLR )
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top