dcsimg
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
    Super Moderator Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    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.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    I dont answer coding questions via PM or EMail. Please post a thread in the appropriate forum section.

    Creating A Wizard In VB.NET
    Paging A Recordset
    What is wrong with using On Error Resume Next
    Good Article: Language Enhancements In Visual Basic 2010
    Upgrading VB6 Code To VB.NET
    Microsoft MVP 2005/2006/2007/2008/2009/2010/2011/2012/Defrocked

  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,265

    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,132

    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,265

    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
  •  



Featured


Click Here to Expand Forum to Full Width