vb6 problem accessing mswinsck.ocx

Posted on 2005-05-13
Medium Priority
Last Modified: 2013-12-25

I had a VB6 program written for me that works fine on my XP laptop. When I install it on my XP desktop, I get an error:

Runtime error '429'
ActiveX component can't create object

at this statement:

Set objSocket = New Winsock

When I asked the coder, he said "The mailer code needs Microsoft Winsock component, and I dont think its finding it on your desktop machine. The solution is simple: 1. On your laptop, look for a file named "mswinsck.ocx" (should be in your system32 folder) 2. Copy it to the system32 folder of the desktop machine 3. Open up a DOS window and get to the system directory. 4. Type: regsvr32.exe mswinsck.ocx (this is needed to register the component)"

I copied mswinsck.ocx to the desktop machine's System32 folder, then opened a DOS window and changed directory to the System32 folder. Then I typed regsvr32 mswinsck.ocx and got a message box that said "DllRegisterServer in mswinsck.ocx succeeded". (I also copied mswinsck.ocx to the application's folder).

I still get the error. So, I ran (in a DOS window on the desktop machine) netdiag /test:winsock /v, which reports that all is OK with winsock.

What do you think the problem is?

Question by:lee88
LVL 10

Accepted Solution

edwardiii earned 750 total points
ID: 13997472
Hi, lee88.

Please see the two URLs below--apparently you'll need the help of the VB coder that created the app to fix this issue (e.g. the coder should create a modified deployment package):


LVL 86

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 750 total points
ID: 13998324
The packaging option won't work.  It is the first link that has the answer.  You cannot create a dynamic instance of the winsock control like that as it will only work on the development machine.  You MUST place the Winsock control on the form.  Read the text of the first link CAREFULLY.

To sum it all up:

    "Therefore, you must provide an instance of the Winsock control on a form so that Visual Basic can compile the license information into the application."

Author Comment

ID: 13998456
I have forwarded the first link to the coder and expect that this is the solution, but have not heard back yet. Thanks a bunch!

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question