Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
Hi Experts,

I am new to win32 programming. I am already familiar with C,C++ and C sharp programming. Can anyone tell the difference or similarities between Win32 programming with C,C++ and C sharp. Also please share the application areas of Win32 programming.

Thanks in advance
Arun....
Posted
Comments
Sergey Chepurin 17-Jun-11 9:46am    
There is already a good answer in Solution 2. Knowing Windows API will certainly make you a better programmer (as good knowledge of C/C++). Nowadays it not used for a team work (thus not adds pluses to your resume) but rather by individuals. It lacks advanced GUI and very time consuming to code. But it produces arguably the smallest and fastest Windows applications possible if (and when) speed and size matters.
Arun India 23-Jun-11 9:03am    
Thanks Sergey for your comments..

You can use C/C++ and C sharp the same as you would on any other system OS, the difference is in the API calls used to access the OS functions.

Microsoft provides free versions of Visual C++ and C # These should get you started in creating Windows applications.
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express[^]

This site offers tutorials in Win32 programming.
http://win32developer.com/[^]

Regards
 
Share this answer
 
Comments
Arun India 17-Jun-11 8:44am    
Thanks S Houghtelin for your immediate reply. Could you tell something about the application areas of Win32 programming? Is it an obsolete technology..?
Albert Holguin 17-Jun-11 8:58am    
how can it be obsolete? what OS are you currently on?
S Houghtelin 17-Jun-11 8:59am    
Obsolete, Yes and No. Windows is here to stay as far as anyone can guess. In what form that is the question.

Win32 is not dead, but is dying (Think XP). However there are still plenty of businesses who simply cannot afford to chuck all of their applications out the door given the amount of time and expense put into them.

I can spend a good chunk of my time supporting VBA, VB6 applications that due to regulations in FDA for health devices that would require a complete V&V redone (Read: lots and lots of $$$) to migrate them.

There are plenty of old timers who will continue to support this technology, but I would advise learning the new(er) platforms.
Arun India 17-Jun-11 9:06am    
S Houghtelin, I heard that in critical systems like flights, developers preferring C and C++ rather than java and .Net. Is it correct..??
S Houghtelin 17-Jun-11 9:16am    
Depends on how close to the hardware the developer is working, for example if the engineer is developing a circuit for a motor controller the microcontroller being will very likey use C or C++ written on a compiler with libtraies provided by the manufacturer specific to that microcontroller. These sytems are very different than programming for a operating system.

For this you can look at something like these:
http://www.freescale.com/webapp/sps/site/homepage.jsp?code=TOWER_HOME&fsrch=1&sr=1

These are hardware platforms that can be programmed to perform specific functions like a clock or a media player. The example codes are generally provided in C++.
Win32 is basically a C API that all the other Windows technologies are built on.

It's not obsolete, although there are a lot of newer layers/frameworks built on top of it. Some will tell you that it's obsolete and you should just learn the latest framework.

If you just need to get some user interface built, then the latest framework is fine until you run into something that doesn't quite work the way you expect. Then if you understand the underlying Win32 layer it helps you figure out what the heck your framework is doing or how to do what you want event though the framework won't let you.

Win32 on your resume won't necessarily get you past the headhunter who is doing a keyword search for .NET or WPF or Silverlight, but it will give you an understanding of the foundation that the rest is build on, and that will make you a better programmer in the long run.

If you want to write Win32 code, I'd recommend C/C++ as they can be compiled natively and directly call Win32 functions.

C# is compiled to CLR (Common Language Runtime) and runs in a "managed" virtual machine. As such calls from it to Win32 functions need to go through a translation layer. So if Win32 itself is what you want to learn, stick with C++. C# has it's own set of libraries/frameworks (.NET) that handle the translation to Win32 -- in C# you would normally call .NET functions rather than call Win32 directly.

As far as application areas, Win32 is really just "how do I interact with the Windows OS" -- that means any application that you'd want to run on Windows will use it. It's not really limited or tailored to any specific application area. There are higher level frameworks that are better for different types of applications, but at the Win32 level there really isn't a distinction to be made.
 
Share this answer
 
Comments
Richard MacCutchan 17-Jun-11 9:47am    
Good answer, and an opportunity. +5
Sergey Alexandrovich Kryukov 17-Jun-11 16:30pm    
Agree, a 5.
--SA
Arun India 19-Jun-11 1:13am    
Thanks TRK3 for your valuable time and detailed explanation.My 5.
Win32 programming is all about calling the windows API routines. That's, why its also called Win32 API programming. The Win32-API programming is all about programming the windows. In C++, you did code for the text based applications. But in Win32, you will code for creating windows, which you daily seen on you Windows PC. For more details, use this link http://www.functionx.com/win32/Lesson01.htm[^]
 
Share this answer
 
Comments
Sergey Chepurin 20-Jun-11 14:31pm    
There are many Windows APIs for Diagnostics, Networking, Security, etc. As MSDN puts it (http://msdn.microsoft.com/en-us/library/Aa383723): " The Windows application programming interface (API) enables applications to exploit the power of Windows". I.e. Windows OS, not just "windows".
Arun India 23-Jun-11 9:06am    
Thanks Harmanjeet Singh and Sergey Chepurin for your valuable comments...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900