Discussion PInvoke

  • Friday, May 11, 2012 5:14 AM
     
     
    What is the diffrence between Adding a assembly as a reference and Using DLLImport?
    • Changed Type Chethan Jain Friday, May 11, 2012 11:59 AM
    •  

All Replies

  • Friday, May 11, 2012 12:33 PM
     
     

    Hi Chethan,

    The DllImport attribute is useful when reusing existing unmanaged code in a managed application. For instance, your managed application might need to make calls to the unmanaged WIN32 API. Which internally using PInvoke Service to call Unmanaged code.

    If you want to reuse, Managed code i.e code written in .NET framework, you can add reference and start using those classes.

    Hope this will answer your question. Feel free to contact in case of query.


    If this post answers your question, please click Mark As Answer. If this post is helpful please click Mark as Helpful.