-
Nov 15th, 2007, 05:45 AM
#1
Thread Starter
Hyperactive Member
[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
-
Nov 15th, 2007, 06:50 AM
#2
Re: Running my VB6 game with a winsock control on a computer without VB6
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.
-
Nov 15th, 2007, 08:00 AM
#3
Thread Starter
Hyperactive Member
Re: Running my VB6 game with a winsock control on a computer without VB6
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
-
Nov 15th, 2007, 08:10 AM
#4
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).
-
Nov 15th, 2007, 08:36 AM
#5
Thread Starter
Hyperactive Member
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
-
Nov 15th, 2007, 09:26 AM
#6
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
-
Nov 15th, 2007, 12:54 PM
#7
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
-
Nov 17th, 2007, 10:26 PM
#8
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.
-
Nov 17th, 2007, 10:29 PM
#9
Re: Running my VB6 game with a winsock control on a computer without VB6
Correct... It been a long time since I used PDW...
-
Nov 17th, 2007, 10:31 PM
#10
Re: Running my VB6 game with a winsock control on a computer without VB6
Lucky you.
-
Nov 17th, 2007, 10:32 PM
#11
Thread Starter
Hyperactive Member
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
-
Nov 17th, 2007, 10:35 PM
#12
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.
-
Nov 17th, 2007, 10:38 PM
#13
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).
-
Nov 17th, 2007, 10:50 PM
#14
Thread Starter
Hyperactive Member
Re: Running my VB6 game with a winsock control on a computer without VB6
Originally Posted by randem
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
-
Nov 17th, 2007, 11:21 PM
#15
Thread Starter
Hyperactive Member
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
-
Nov 18th, 2007, 06:47 AM
#16
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...
-
Nov 18th, 2007, 06:50 AM
#17
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|