Results 1 to 6 of 6

Thread: [RESOLVED] VB6 and API's

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2006
    Location
    Paris
    Posts
    301

    Resolved [RESOLVED] VB6 and API's

    I noticed that even if you don't use dstribution/installation systems, if you only use the standard controls the apps made with VB6 are always compatible in all Windows based platforms at least from win98,2000,XP and Vista. (I know because I make my apps with XP and give them to friends who use Vista or Win98 WITHOUT using installators/setups)

    But what if you use a lot of APIs ? Are APIs sensitive to different Windows editions ?
    Are there some APIs that work for XP that might not work under Vista or W7 ?

    Just wondering
    Thanks.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: VB6 and API's

    Your question, as asked, is too broad for give a definitive answer. That depends entirely upon the APIs you use.

    Many APIs are called directly from Windows system files like USER.EXE and KERNAL, etc. Those file are an intragal part of the Windows OS, so they will always be present (unless Microsoft decides to rename them)

    Also, some, but not all, APIs may function differently under different OS because they were changed when the new OS was created.

  3. #3
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: VB6 and API's

    Windows API functions use whatever system DLLs are on the system (the name of the library/DLL appears after "Lib" in the declarations).

    These system files can be different on different versions of Windows, or not present at all (most are present, though).

    For this reason, some API calls either won't work on some versions of Windows, or will behave differently. But this is not very common.

    MSDN should tell you what platforms are supported by an API function. I also like to use this site.

    You don't need to distribute any extra files to use API calls (that's a big reason some people prefer them over using OCX controls that come with VB) so long as it's a standard system library (Kernel32, User32, etc.).

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,929

    Re: VB6 and API's

    AllAPI is good for VB code samples, but not much else unfortunately.

    In terms of which version(s) of Windows support each API (and other info, like different behaviour depending on Windows version), the best place is the official documentation: http://msdn.microsoft.com/en-us/libr...88(VS.85).aspx ..just ignore the code samples (which are for C).
    Quote Originally Posted by horazio View Post
    I noticed that even if you don't use dstribution/installation systems, if you only use the standard controls the apps made with VB6 are always compatible in all Windows based platforms at least from win98,2000,XP and Vista. (I know because I make my apps with XP and give them to friends who use Vista or Win98 WITHOUT using installators/setups)
    That is not true for anything earlier than XP I'm afraid, and even with XP you are running a risk (Vista is the first 'safe' version of Windows to do that with).

    You have just been lucky so far - it seems that your friends already have the required files because of other programs they installed earlier.

  5. #5
    PowerPoster
    Join Date
    Jun 2001
    Location
    Trafalgar, IN
    Posts
    4,141

    Re: VB6 and API's

    If I remember correctly the second edition of Window ME was the first OS to have the VB runtime files as part of a standard install.

  6. #6
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,929

    Re: VB6 and API's

    That may well be true, but there are several SP's of the runtimes, and it isn't safe to assume that programs will work correctly with the different SP's.

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