What I can do using Windows API, that I can not do using native .NET code?

Hello,

This may appear as a bit strange question, but I would really like to know the answer to it!

The question is:
Is there something that I can do using only Windows API (from say VB6), which I can not do using pure managed code (native code) in VB.NET or C#.NET?
Or put it the other way: Using VB.NET or C#.NET native managed code, can I do absolutely everything that I can do using Windows API?
In other words, do I have the ENTIRE functionality of the  Windows API, using pure VB.NET or C#.NET managed code (native code)?

Thank you.
BigBossAsked:
Who is Participating?
 
iHadiConnect With a Mentor Commented:
Hi

There are a lot of things you cannot do using .NET managed code which you can using API.

Some functions will be:
Getting the handle of active window or other special windows like the desktop.
Sending messages and commands to other windows and applications.
Setting the cursor position to a specific point.
...
0
 
Mike TomlinsonConnect With a Mentor Middle School Assistant TeacherCommented:
"In other words, do I have the ENTIRE functionality of the  Windows API, using pure VB.NET or C#.NET managed code (native code)?"

No, the .Net framework does NOT encapsulate every single Win API that is available in the operating system.

Some big ones:

(1) Global Keyboard and Mouse Hooking
(2) System Wide Hotkeys
(3) Hooking/Subclassing an External applications windows
(4) Manipulation of External application windows such as moving windows, changing window states, enumerating child controls of a specific window, etc...
(5) Many, many more...too many too list!
 
0
 
BigBossAuthor Commented:
iHadi, thank you for your comment! Greatly appreciated!
I would like to hear from some other experts, please!
Can anyone add to these indicated by iHadi?

Thank you.
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
felipecslCommented:
I think the responses above are enough. Just would like to comment that despite these functionalities are not available when using managed code (.NET), you can still use P/INVOKE to call unmanaged code that does the work you need. Take a look at the System.Runtime.InteropServices namespace.
Links:
http://www.pinvoke.net/
http://www.codeproject.com/netcf/compframe1.asp
0
 
Bob LearnedCommented:
It is easier to know what it can do, than what it can't:

Microsoft Win32 to Microsoft .NET Framework API Map
http://msdn2.microsoft.com/en-us/library/aa302340.aspx

This is an old article and applies to 1.1, but you get the idea.

Bob
0
 
BigBossAuthor Commented:
Many thanks to all of you...

Best regards.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.