Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Jeddah, Saudi Arabia
    Posts
    243
    Thanks
    0
    Thanked 1 Time in 1 Post

    API Viewer (.NET)

    I found this neat API viewer on a source disk I got at a swap meet. It's written in VB.NET and has some very interesting techniques in the code. Well worth a gander. The beauty of it is that it gives the declarations of the WIN32 API for VB .NET and C#.

    Check the Readme.txt file for instructions.

    Regards,

    Kevin Bell

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: API Viewer (.NET)

    Kevin,

    So, are API calls considered "unmanged" code?

    ...just giving you are hard time. Thanks for the file. I've download
    and am checking it out.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: API Viewer (.NET)

    Kev & Kev:

    Don't know anything about API calls in .Net, but thought the following might be apposite: at the VS LIve conference in San Francisco in February, Dan Appelman had a presentation on 'Visual Basic .NET and the Win32 API' (I didn't attend the conference but I read the brochure <img src=/S/grin.gif border=0 alt=grin width=15 height=15>) - anyway here is the description:
    <hr>You'll learn how to migrate VB6 API calls to Visual Basic .NET. More importantly, you'll learn why you should avoid using Win32 API calls when possible, and how an understanding of code access security is essential for correctly calling Win32 API functions from Visual Basic .NET when you have no other alternative. Though intended for programmers migrating from VB 6, this talk will be applicable to those moving to C# as well as Visual Basic .NET<hr>
    Gary

  4. #4
    5 Star Lounger jujuraf's Avatar
    Join Date
    Jun 2001
    Location
    San Jose, California, USA
    Posts
    1,061
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: API Viewer (.NET)

    Yes API calls are definitely considered 'unmanaged' code. Anything that runs under the control of the CLR (common language run-time) is managed, all else is unmanaged. Therefore, ActiveX controls, Win32 API, COM componenents are unmanaged. There are ways to wrap managed code around unmanaged code which makes it safer, however. At least this is true for COM objects you might want to use.

    Since .Net gives you much greater access to the functionality of the Windows internals than you used to have (which is why you often had to revert to using the Win32 API in the first place) you should only rarely if ever have to use it again. Of course coming up to speed on .Net is a huge undertaking in itself. Programmers might feel more comfortable using the old Win32 API just out of familiarity but in practice it should not be used anymore (and you need to take the time to learn how to do it the .Net way).

    Deb

  5. #5
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: API Viewer (.NET)

    Touche. Well said.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: API Viewer (.NET)

    Kinda sounds like Mr. Appelman's squeezing as much revenue from his API
    expertise as he can -- although he deserves every cent he gets...
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  7. #7
    3 Star Lounger
    Join Date
    Aug 2001
    Location
    Jeddah, Saudi Arabia
    Posts
    243
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: API Viewer (.NET)

    He certanly does deserve every penny Kev.

    I posted this program for 2 reasons.

    1. Because I still have code snippets that use the API and I havent got round to converting them all to .NET framework.
    2. When I examined the code for this program I saw some very good and useful coding techniques used.

    Also it gives the calls in C# and I know Kev's on the road to C#, (Sounds like a Bob Hope movie).

    Regards,

    Kevin Bell

Posting Permissions

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