Results 1 to 4 of 4

Thread: win32api.txt for VB.Net

  1. #1

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359

    win32api.txt for VB.Net

    Does such a beast exist...?
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  2. #2
    Hyperactive Member CyberHawke's Avatar
    Join Date
    May 2004
    Location
    Washington DC
    Posts
    477
    I'm not sure, and anyway, the way you handle api calls in .NET is very different from the way you do it in VB6 and prior.

    If you intend to do api calls from .NET, familiarize yourself with COM interop.

    I had a project where I made a few around here somewhere . . . dang, must be at home.

    I'll look it up tonight when I get home and send you an example.

    Unless one of the other nice posters here have one first

  3. #3

    Thread Starter
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Why would I need to go anywhere near COM for using APIs...
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  4. #4
    Hyperactive Member CyberHawke's Avatar
    Join Date
    May 2004
    Location
    Washington DC
    Posts
    477
    ok, sorry for the confusion, with the exception of COM, you will still need to rely on System.Runtime.InteropServices to get the job done.

    The declarations are the same as they were for VB6 and earlier, I believe I saw an example of a loader out there on the net somewhere, but cannot find it at the moment.
    In any case if you know how to declare your api calls in VB6, then the same declarations will work in .NET

    There are some things to consider when making your declarations tho, the most significant is declaring your character set when making your api function declaration.

    In the help that comes with the .NET install there is an article that discusses api declaration and focuses on just this topic.
    Look up "Specifying a Character Set in Visual Basic" in the help files.

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