C++ to C#
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: C++ to C#

  1. #1
    Join Date
    Apr 2010
    Posts
    5

    C++ to C#

    There is a project written in C++. That is http://seb.svn.sourceforge.net/viewv...s/1.2/win/Seb/ . I want to use the msghook.dll in my c# .net 2008 project to disable some control keys such as alt+tab, WinKey, CTRL+ESC, TaskManager. I have no knowledge about using DLLs in C# project, i want some detailed explanations. Thank you..

    Note: The software i'm coding is related with education, and that is not about coding malwares.

  2. #2
    Join Date
    Jun 2008
    Posts
    2,477

    Re: C++ to C#

    Use PInvoke to utilize native dll's in your managed app. Google for PInvoke, you will find all taht you need to know.
    If you liked my post go ahead and give me an upvote so that my epee.... ahem, reputation will grow.

    Yes; I have a blog too - http://the-angry-gorilla.com/

  3. #3
    Join Date
    Apr 2010
    Posts
    5

    Re: C++ to C#

    i think the add-in is just for vs 2003 and 2005. I'm using VS 2008

  4. #4
    Join Date
    Jun 2008
    Posts
    2,477

    Re: C++ to C#

    What? What add-in? PInvoke stands for platform invoke and is built into the langauge/runtime.
    If you liked my post go ahead and give me an upvote so that my epee.... ahem, reputation will grow.

    Yes; I have a blog too - http://the-angry-gorilla.com/

  5. #5
    Join Date
    Apr 2010
    Posts
    5

    Re: C++ to C#

    There is an addin called pinvoke, i thought you'd mentioned about it, but i was wrong. I tried dllimport, but i cannot figure out arguements in the class. there are two args, one is bool, the other is hinstance. how can i use the arg. hinstance?

  6. #6
    Join Date
    Jun 2008
    Posts
    2,477

    Re: C++ to C#

    If you liked my post go ahead and give me an upvote so that my epee.... ahem, reputation will grow.

    Yes; I have a blog too - http://the-angry-gorilla.com/

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center