Windows API and .NET Framework?

This is a discussion on Windows API and .NET Framework? within the Windows Programming forums, part of the Platform Specific Boards category; Hello people. I will soon be taking a tutorial in programming with the WinAPI, but later on I want to ...

  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    45

    Windows API and .NET Framework?

    Hello people.

    I will soon be taking a tutorial in programming with the WinAPI, but later on I want to integrate it with some of the controls and features provided by the Windows .NET Framework. Is this possible, or is the technology of WinAPI to old for that. I would also like to know if WinAPI programs will be supported in future versions of windows such as windows 7?

    Please tell me if the WinAPI and the .NET framework can be integrated as if they cant be, i wont bother wasting my time on the WinAPI tutorial,

    Thanks in advance,
    mintsmike

  2. #2
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,031
    I think you have a wrong understanding of what WinAPI is.
    WinAPI is the C-portion of the interface to interface with Windows™.
    dotNet is basically the C#-portion of the interface to interface with Windows™.
    dotNet GUI and WinAPI do not mix well, if at all.

    And yes, since WinAPI is the basic portion of Windows--its foundation, so to speak, it will remain and it is still left in Win7.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Registered User
    Join Date
    Mar 2009
    Posts
    45
    So, which interface do you reccomend to me.

    Im thinking .NET, but i would like a second oppion,

    Thanks in advance,
    mintsmike

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,031
    dotNet is more higher-level and easier to use than WinAPI and a lot more flexible.
    That being said, however, I despise all that has to do with dotNet and would go for a C++ Framework GUI Library (such as wxWidgets among others).
    But don't entirely rely on my opinion and take a look at the 3 for yourself, if you can.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  5. #5
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,762
    I thought the point of .NET was that it was available across several languages and that the only downside was the megabytes of framework that you had to attach. At least know what .NET is before you go espousing your opinion.
    Last edited by whiteflags; 06-28-2009 at 05:23 AM.

  6. #6
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,031
    I know what dotNet is.
    It's Microsoft's huddly-cuddly all-in-one language-wide platform.
    And I don't like it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  7. #7
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    I thought the point of .NET was that it was available across several languages and that the only downside was the megabytes of framework that you had to attach. At least know what .NET is before you go espousing your opinion.
    And that it is only available on Windows.

  8. #8
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    23,031
    For now. It's a standard, so measures are being taken to make it available on other platforms.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  9. #9
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    22,308
    Quote Originally Posted by cyberfish
    And that it is only available on Windows.
    I had the impression that due to Mono that is no longer the case.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  10. #10
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    POSIX has been a standard for a few decades, too, and Windows is still lacking most of the POSIX functions.

    A standard doesn't mean much if people don't implement it.

  11. #11
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    I am not sure how good Mono is (since I don't use .Net myself), so I won't comment on that.

    But reading the Wikipedia page -
    Mono (software) - Wikipedia, the free encyclopedia
    Mono’s implementation of those components of the .NET stack not submitted to the ECMA for standardization has been the source of patent violation concerns for much of the life of the project. In particular, discussion has taken place about whether Microsoft could destroy the Mono project through patent suits.

    The base technologies submitted to the ECMA, and therefore also the Unix/GNOME-specific parts, may be non-problematic. The concerns primarily relate to technologies developed by Microsoft on top of the .NET Framework, such as ASP.NET, ADO.NET and Windows Forms (see Non standardized namespaces), i.e. parts composing Mono’s Windows compatibility stack. These technologies are today not fully implemented in Mono and not required for developing Mono-applications. Richard Stallman has claimed it may be "dangerous" to use Mono because of the possible threat of Microsoft patents.[9]

    On November 2, 2006, Microsoft and Novell announced a joint agreement whereby Microsoft agreed to not sue Novell’s customers for patent infringement.[10] According to Mono project leader Miguel de Icaza,[11] this agreement extends to Mono but only for Novell developers and customers. It was criticized by some members of the free software community because it violates the principles of giving equal rights to all users of a particular program (see Novell and their Patent Agreement with Microsoft).
    I got the impression that the issue is still quite muddy.

  12. #12
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    Win32 API calls can be made from C# using the import functionality in C#. There are also files available on CodeGuru and other sites like it that define all the windows messages so you do not have to trap for constant values when trapping for certain messages.

    .NET is fine except the Win32 API does much more. I find it odd that Win32 is still needed for many advanced Win32 functionalities. One would think .NET could handle it all but alas it cannot and does not. .NET is awesome as it is but it needs to implement more of the Win32 API before I would consider it done.

    From a GUI standpoint there are also certain messages for which there is no C# equivalent handler for. For these you will have to manually handle them by deriving your Form class from IMessageFilter and then overriding PreMessageFilter().

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Get .net framework version
    By kairozamorro in forum C# Programming
    Replies: 0
    Last Post: 05-18-2009, 02:02 AM
  2. A question about windows programming
    By Hussain Hani in forum Windows Programming
    Replies: 16
    Last Post: 05-23-2007, 08:38 AM
  3. FlashWindowEx not declared?
    By Aidman in forum Windows Programming
    Replies: 3
    Last Post: 05-17-2003, 03:58 AM
  4. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 06:31 PM
  5. Visual J#
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-08-2001, 03:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21