Thread: Ulrador: Direct interface to Win32 API?

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    50

    Ulrador: Direct interface to Win32 API?

    I think the subject says it all -

    In a previous post, you mention that Windows programming can be done in lots of languages, not just C++ (a fact I already knew)... but then you go on to say that you prefer to interface with the Win32 API directly.. what did you mean by that?

    I am a newbie at Windows programming so I think there is a fundamental piece of information I am missing:

    For example, are you implying that that API has more fundamental function calls that you prefer to implement directly, instead of using something like C++ to call a C++ routine that in turn utilizes the API function?

    Thanks Ulrador

  2. #2
    Registered User
    Join Date
    Dec 2001
    Posts
    421
    Well, I don't consider myself to be an authority on the subject, but i'll give you my thoughts on the matter.

    The windows API is obviously a set of functions that you can use for programming Windows applications. The API caters for quite a few things from GUI implementation through to multithreading and networking. MFC is a set of C++ classes that wrap up the Win32 functionality into a supposedly more user friendly interface. If you look at the source to MFC you'll see that it does all the calling of the WIndows API for you. Personally, i really dont like using MFC, I prefer to make the calls to the windows API directly in my code.

    So what i mean is, my code has API function calls listed inside, rather than having MFC code (takes out one layer of abstraction).

    are you implying that that....

    what i am saying is that i prefer to interface directly with the windows API rather than having another bunch of function calls do it for me just for ease of use. The added bonus is that you dont have to worry about MFC Dlls (even though this isn't realy a problem these days).

    Apps that are written using MFC tend to be a little slower than apps that dont, but you'll really only notice that on resource-intensive applications. i noticed a difference while writing a raytracer.... the straight win32 version was quite noticably faster than the MFC version.

    Direct calls to the API will always be that little bit faster than using any kind of wrapper.

    Ultimately, it is just a matter of preference. I prefer not to use MFC. I also think that learning to call the API yourself will mean that you are better equipped to deal with pitfalls in the windows API and MFC.

    BTW, the name's "Uraldor", not "Ulrador"

    hope that helps!
    U.

    PS. if you want to ask me questions, email me directly rather than posting here, as you might bother some other people.
    Quidquid latine dictum sit, altum sonatur.
    Whatever is said in Latin sounds profound.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Win32 API or Win32 SDK?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 07-20-2005, 03:26 PM
  2. OpenSSL and Win32 SSL API :: SSL/TLS
    By kuphryn in forum Networking/Device Communication
    Replies: 0
    Last Post: 03-10-2004, 07:46 PM
  3. FILES in WinAPI
    By Garfield in forum Windows Programming
    Replies: 46
    Last Post: 10-02-2003, 06:51 PM
  4. OLE Clipboard :: Win32 API vs. MFC
    By kuphryn in forum Windows Programming
    Replies: 3
    Last Post: 08-11-2002, 05:57 PM
  5. Thread Synchronization :: Win32 API vs. MFC
    By kuphryn in forum Windows Programming
    Replies: 2
    Last Post: 08-09-2002, 09:09 AM