Thread: Differences

  1. #1
    Registered User
    Join Date
    May 2010
    Posts
    62

    Differences

    I am learning C++ now and after this I would like to go on to programming for the Windows platform. My question now is if there is any difference between coding using the WIN32 API for different versions of Windows or is there only a difference between coding for a 32 bit and 64 bit processor?

  2. #2
    Registered User
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    375
    Not really a big difference between versions of Windows. As long as you stick purely to the Windows API and don't try any 'hack'-ish behaviour then you'll be right. The Windows API is very backward compatible, and MSDN has great documentation so you can find out what the minimum supported client for any given API call is.

    I've compiled 32-bit applications on XP which have then worked reasonably well on 64-bit Windows 7 (there's some compatability layer, I believe?). If you want to compile natively for 64-bit then there are probably some differences, never been bothered to find out the details though.

  3. #3
    Registered User
    Join Date
    May 2010
    Posts
    62
    Are there any good books for beginners that want to use the WIN32 API that you recommend?

  4. #4
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Mainframe assembler programmer by trade. C coder when I can.

  5. #5
    Registered User
    Join Date
    Jan 2009
    Location
    Australia
    Posts
    375
    theForger's Win32 API tutorial is also quite a good guide.

    theForger's Win32 API Tutorial

    As an added bonus, it's free!

  6. #6
    Registered User
    Join Date
    May 2010
    Posts
    62
    Thanks to the both of you.

  7. #7
    Registered User
    Join Date
    Jun 2010
    Location
    Bakersfield, California
    Posts
    22
    Just keep in mind that every release of Windows has additional Win32 functions, structures. It is possible to use Win32 functions that work in Windows 2000 for example, that will not work in Windows NT. I'm using Visual Studio 2005, and there is quite a bit about it in the help file.

  8. #8
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    Quote Originally Posted by Kitt3n View Post
    ...or is there only a difference between coding for a 32 bit and 64 bit processor?
    There isn't much difference except that the sizes of types are different. So if you don't rely on this, you should be fine.

    Quote Originally Posted by micahharwell View Post
    ...I'm using Visual Studio 2005, and there is quite a bit about it in the help file.
    Consider upgrading to 2010 if you can. The Express edition is free.
    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
    'Allo, 'Allo, Allo
    Join Date
    Apr 2008
    Posts
    639
    Quote Originally Posted by micahharwell View Post
    Just keep in mind that every release of Windows has additional Win32 functions.
    For anybody who cares, here is my look into this. The XML files are essentially diffs between Windows versions, and the Access file is what Dependency Walker would be if it was a database, and was ran on every exe and dll in the X86 system/system32 folders since Win98.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. stdio differences windows vs linux
    By keira in forum C Programming
    Replies: 6
    Last Post: 09-14-2008, 04:42 PM
  2. differences between images
    By ^DJ_Link^ in forum C Programming
    Replies: 2
    Last Post: 02-21-2005, 08:03 AM
  3. Differences in Debug and Release builds in MSVC
    By TravisS in forum C Programming
    Replies: 5
    Last Post: 06-19-2002, 10:40 PM
  4. Differences b/w Unix and Linux
    By OS Idiot in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 12-15-2001, 09:21 PM
  5. Differences between C++ & Visual C++
    By Unregistered in forum C++ Programming
    Replies: 7
    Last Post: 10-31-2001, 04:52 AM