Results 1 to 4 of 4

Thread: API discouraged in .NET?

  1. #1

    Thread Starter
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    API discouraged in .NET?

    I just got my copy of .Net yesterday...

    anyway, it looks like you can use API as usual, but the MSDN help says most of the functions can be obtained through wrappers of the .net framework.....

    Well, i couldn't find much info past that....

    So where are these wrapper functions? Say for example, GetTickCount...?

  2. #2
    Frenzied Member DevGrp's Avatar
    Join Date
    Nov 2001
    Location
    Charlotte, NC
    Posts
    1,256
    You can get 'GetTickCount' from the TimeSpan class.

    The use of the api is discouraged, but it cant be avoided. However as MS releases updated version of the Framework, we should see less use of the API.
    Dont gain the world and lose your soul

  3. #3
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    From what i have read about .Net using the API is discouraged because of a number of reasons.

    1.) Since the API is not object based the developer must learn complex function calls with long lists of arguements.

    2.) Some of the naming schemes for the functions is inconsistent.

    3.) Since the API was written in C++ getting the calling conventions right on data types such as strings is very messy.

    Ive heard that in time they will try and abstract away the API, so i guess this is a start with the wrapper functions that you talked about using.

  4. #4
    Lively Member Tygur's Avatar
    Join Date
    Jul 2002
    Posts
    108
    These "Wrappers" aren't really direct wrappers around API functions. They're just parts of the Framework that work well as alternatives to the API functions.

    Basically, the claim is that most of what you had to use API functions for before can now be done by using the classes provided by the .NET Framework.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width