Find jobs | Company-wise jobs
Jobseekers | Employer login
About us Sitemap of www.CareerRide.com Sitemap FAQ related with www.CareerRide.com FAQ Click here to Contact us Contact
       
Submit Resume Free ! | Access Resume Free !
Home Interview Q&A Tutorials .NET Java Soft skills CV GD Work from home IT practice test MBA practice test FAQs in PDF Books Jobs FAQs
Interview questions                                 
.NET FAQs
C#.NET FAQs
VB.NET FAQs
Check your Framework skills!
Check your ASP.NET skills!
Test your ADO.NET skills!
DOT.NET FAQs
 
NET framework
NET assembly
NET code security
NET access modifiers
NET architecture
NET base class library
NET CLR
NET constants,enum,arrays
NET data types
NET menu
NET garbage collection
NET debug and trace
NET properties
NET form
NET assemblies & resources
NET class & structures
NET binding,viewing,filtering
NET configuring & optimizing
NET configuring setup project
NET constructors & destructors
NET control
NET dataset objects
NET debugging tools
NET debug & trace classes
NET delegates & events
NET exception handling
NET globalization-localization
NET interoperability
NET project deployment
NET securing application
NET using XML
NET validating user input
NET windows communication
NET windows presentation
NET windows workflow
NET Crystal Reports
.NET Framework
 
ADO.NET
OOPS in .NET
Net mobile
LINQ
.NET compact framework
Silverlight
 
 

.NET managed vs. unmanaged code


Managed vs. unmanaged code

Managed vs. unmanaged code
Explain - consuming unmanaged DLL functions using PInvoke.
Explain how managed code slower than unmanaged code.

Managed vs. unmanaged code - March 13, 2009 at 15:20 PM by Amit Satpute

Managed vs. unmanaged code

  • Managed code runs through a runtime which is a software layer that the application communicates due to which many functions are automatically done. Some of these functions are garbage collecting and exception handling.
  • A programmer needs to write many common functions in an unmanaged code. So functions like garbage collecting, exception handling, etc have to be handled explicitly.

Explain - consuming unmanaged DLL functions using PInvoke.

PInvoke = Platform invoke.
Calling a function located in an unmanaged DLL library from .NET framework is called consuming unmanaged DLL function.
When PInvoke calls an unmanaged function,
The DLL containing the function is located and loaded it into memory.
Then the function arguments are pushed into the stake and then the data is marshalled required.
And then the control is transferred to the unmanaged function.
PInvoke throws exceptions generated by the unmanaged function to the managed caller.

Explain how managed code slower than unmanaged code.

Managed code executes under the management of a virtual machine. It is executed by a common language runtime environment rather than directly by the operating system. Tasks such as Exception handling and GC too are handled in the managed code environment. Due to all these reasons, managed code is slower than the unmanaged code.

More Related Links
NET Assembly

Define .Net Assembly.
What does an assembly contain?
Define a private assembly and a shared assembly.
What are Satellite Assemblies?
What do you understand by side-by-site execution of assembly?
How do you create a resource-only assembly?

What Is AJAX? History of AJAX, Advantages of AJAX

With AJAX, only the necessary data is transferred back and forth between the client and the web server. This minimizes the network utilization and processing on the client........

What Is ASP.NET 2.0 AJAX?

AJAX-style communications between client and server. This communication is over web services. Asynchronous communication. All client-to-server communication in the ASP.NET 2.0 AJAX framework is asynchronous................

Potential benefits of using Ajax

AJAX makes it possible to create better and more responsive websites and web applications...............

Potential problems with AJAX

Search engines may not be able to index all portions of your AJAX application site.........

What Is ASP.NET AJAX?

ASP.NET AJAX is the name of Microsoft’s AJAX solution, and it refers to a set of client and server technologies that focus on improving web development with Visual Studio...............

 
Want to be hunted by potential employers? Just submit your key skills!

Popular FAQs

.NET .Net Architecture ADO.NET Java Oracle C#.NET
VB.NET DOT.NET AJAX ASP.NET NET Framework OOPS in .NET
C++ Sql Server Data warehousing EJB MySQL Linux
PHP UML Networking Testing XML  
 
Copyright © 2008 - 2010 CareerRide.com. All rights reserved.