Results 1 to 8 of 8

Thread: API calls and Net compatibility

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2004
    Posts
    39

    API calls and Net compatibility

    Lately I was trying to do some work with Print Spooler. I did not find any classes that handle the spooler so I turned to use API calls. I am new to using API calls from VB so I had to do some reading. I came across a comment in a document on the Microsoft site which basically indicates the minuses of using API calls. The comment that attracted my attention says the following "The .NET common language runtime is meant to be platform non-specific".

    I think the NET framework is Windows specific or I am wrong. What is platform non-specific with .NET.

    Also what are people supposed to do if they require functionality which is not provided by .NET.

    I wonder how many people in this forum make use of API calls.

  2. #2
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi.

    I use it all the time

    The only problem I have encountered is that the declarations might look a little different from what the docs say.
    For example, the docs say "byval hWnd as Integer". There you would usually use "byval hWnd as IntPtr"

    But in general, there's no problem using them.
    I think, what they mean about "platform non-specific" is that the same app could be used for the Compact Framework and such, though I'm not sure about that one.
    Also I believe the plan is to adopt the framework to other platforms aswell, and then using API would screw it all up.

    But as long as you decide that your app is windows only, go for it.

    I hope this is of any help to you at all.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2004
    Posts
    39
    Pax

    It is good to know that you use API calls all the time, actually I already came across the issue of using INTptr instead of integer.

    I think that anybody using API calls should understand that the application will be windows specific, APIs come from windows DLL and I do not expect to find these on other platforms.

    As regards porting NET to other platform I have my doubts, do we expect to have someting called NET for UNIX or MAC.

    Could be that somebody else on this forum knows more on this. A few months ago I had a discusion with somebody as I think that with the use of the NET framework the applications will become more platform specific.

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    I love APIs . .NET Framework , sadly , still misses some essential functions regarding GDI , Hardware ...etc .

    As for the Unix and .NET Framework , yes there is an attempt to do this . The project is called mono , search here for the links....

  5. #5
    Fanatic Member pax's Avatar
    Join Date
    Mar 2001
    Location
    Denmark
    Posts
    840
    Hi.

    Well, there are allready others who are making compatible frameworks for other platforms. (I belive one exists for Linux, but I'm not sure...)

    Of course, MS doesn't support this, because they didn't make it, but it does open up for the opportunity that your app can run on both Windows and Linux or something else.

    The use of API, removes this opportunity.

    The information above is only rumors, and I have no idea wether they are true or not, but it's still worth taking into account when designing an app.
    I wish I could think of something witty to put in my sig...

    ...Currently using VS2013...

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    MS , as I've heard from here , is eliminating the number of APIs from 70,000 to about 10,000 in longhorn ... . So , they might develop this Framework untill it becomes non platform specific (just a guess) and getting rid of the APIs .

  7. #7

    Thread Starter
    Member
    Join Date
    Mar 2004
    Posts
    39
    I honestly believe that if we think of having the net framework for all platforms including non Micrisoft specific it will only be wishfull thinking.

    It will be very nice to have the net framework for all paltforms and supported by Microsoft but then it will also require to be updated to stay compatible or else one will ned up stay with net Framework ver 1.1 for compatibility.

    As regards API I hope that if it is true that the APIs will be reduced then the net framework should be able to support the same functions.

  8. #8
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    I'm sure everyone wishes his app runs on different platforms but MS doesn't want to support other OS maybe for commercial purposes *my view point* .

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