Results 1 to 17 of 17

Thread: [RESOLVED] Running my VB6 game with a winsock control on a computer without VB6

  1. #1

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Resolved [RESOLVED] Running my VB6 game with a winsock control on a computer without VB6

    I've made a game using VB6 and windows API, and it has networking using a winsock control.
    I've just tried running it on another computer for the first time, one that doesn't have VB6 installed. The program opens fine, and can do some things, but once a form is opened that uses the winsock control, I get the following error:
    "run-time error '339':
    Component 'MSWINSCK.OCX' or one of its dependencies not correctly registered: a file is missing or invalid"
    Then it crashes (I should probably put some error handling in).
    1- What files do I need to distribute with this to get it to work?
    2- Where can I find these files?
    3- Do I need to implement any sort of installing in my program, or will just putting the relevant files into the zip make it work?
    Cheers,
    metal

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

    Re: Running my VB6 game with a winsock control on a computer without VB6

    Quote Originally Posted by metalmidget
    Then it crashes (I should probably put some error handling in).
    Yes you should.. but it might not help in this particular case (as the error is 'too big').
    3- Do I need to implement any sort of installing in my program, or will just putting the relevant files into the zip make it work?
    If you have used VB (any version), you should be using an installer.

    Like most Windows programs, VB programs have dependencies (DLL's and OCX's etc).

    Sometimes you'll get lucky, but often you will find that your dependencies are not installed already - so you need to install them. Or worse, they are installed, but they are out of date versions that contain bugs (look at the readme for VB6 SP6 - there are lots of bugs fixed that would look like errors in your code!).

    If you want your program to work, install it. Doing anything else is not reliable - you will just be hoping that somebody else has already installed what you need.
    1- What files do I need to distribute with this to get it to work?
    2- Where can I find these files?
    In general, you don't actually need to know - just run the packaging tool (P&DW, or whichever you use), and it will find & add the files for you.

  3. #3

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: Running my VB6 game with a winsock control on a computer without VB6

    Quote Originally Posted by si_the_geek
    In general, you don't actually need to know - just run the packaging tool (P&DW, or whichever you use), and it will find & add the files for you.
    Right. Well that's all well and good, but I really have no idea about this sort of stuff. The furthest I've gotten with distributing anything I've made so far is emailing it between home and school... Is there a packaging tool built into the IDE? Or do I need to download something extra?
    Cheers,
    metal

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

    Re: Running my VB6 game with a winsock control on a computer without VB6

    You can use P&DW (Package and Deployment Wizard) that comes with VB - it should be on the Start Menu next to VB itself.

    It isn't ideal tho, so you may want to download an alternative, many of the more popular ones are listed in the FAQs at the top of this forum.


    If you use one which is designed for VB programs (like P&DW, or Visual Studio Installer), you generally only need to select the project file and it does the rest for you (but in the case of VSI at least, you can select other options, such as where to install shortcuts to the program, and the screens to show during installation).

  5. #5

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: Running my VB6 game with a winsock control on a computer without VB6

    OK, so I ran through that wizard, and it's created a bunch of things. (my project is called "Blast Away!" by the way). the wizard created:
    Blast Away!.CAB
    Setup.exe
    SETUP.LST
    A folder called Support, which has mostly the same files as those in the .CAB file, with a couple of extras.

    So what do I need people to download, and what should they run to get the game to work?
    Cheers,
    metal

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

    Re: Running my VB6 game with a winsock control on a computer without VB6

    It's been a long time since I used P&DW, but I think people will need the three files you listed, and will just need to run Setup.exe

  7. #7
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Running my VB6 game with a winsock control on a computer without VB6

    You just need the Setup.exe file...

    But please read Installer Problems for more help on this situation

  8. #8
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Running my VB6 game with a winsock control on a computer without VB6

    Actually setup.exe looks for setup.lst to know what to install, it isn't tailored code. The setup.lst tells setup.exe which .cab file(s) to process.

    So you need all three.

  9. #9
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Running my VB6 game with a winsock control on a computer without VB6

    Correct... It been a long time since I used PDW...

  10. #10
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Running my VB6 game with a winsock control on a computer without VB6

    Lucky you.

  11. #11

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: Running my VB6 game with a winsock control on a computer without VB6

    OK, so I need the 3 files, but not that other folder?
    I'm having troubles installing it onto another computer. From looking on a couple of sites I don't think it's an uncommon problem. During setup it says it needs to update a file and restart the computer. So I restart my computer, then it says exactly the same thing next time.
    I'll keep reading to try and find the solution, unless anyone can give me an easy one here?
    Cheers,
    metal

  12. #12
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: Running my VB6 game with a winsock control on a computer without VB6

    Please read this Installer Problems you need to replace your VB runtime files.

  13. #13
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Running my VB6 game with a winsock control on a computer without VB6

    The other folder contains files to be used to verify that packaging was done properly and to assist in repackaging. For small programs you probably don't even need to keep any of these.

    I agree. You are probably deploying from your System32 directory, and are using an inadequately patched VB6 installation. Personally I recommend VB6 SP6, but some people swear by SP5 (I haven't seen any substantial reasoning for this myself - though there was a bug or two in the SP6 that came out initially).

  14. #14

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: Running my VB6 game with a winsock control on a computer without VB6

    Quote Originally Posted by randem
    Please read this Installer Problems you need to replace your VB runtime files.
    When you say "you need to replace", do you mean that the computer that's having troubles installing needs to replace the files? Or do I need to replace the files on the computer that's creating the installer, and then re-package my program?
    Cheers,
    metal

  15. #15

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: Running my VB6 game with a winsock control on a computer without VB6

    OK, so I'm guessing you meant the latter, because that just worked.
    YAY!
    Thanks heaps to all!
    metal

  16. #16
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: [RESOLVED] Running my VB6 game with a winsock control on a computer without VB6

    Yes, you are correct. You need to have those files in your installation that you are deploying...

  17. #17

    Thread Starter
    Hyperactive Member metalmidget's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia
    Posts
    342

    Re: [RESOLVED] Running my VB6 game with a winsock control on a computer without VB6

    I'm a bit of an idiot. I didn't even realise I had an out of date version of VB6 until now
    Ah, it's all packaged up, take a look in my sig if you're interested
    Cheers again,
    metal

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