vb6 problem accessing mswinsck.ocx

Posted on 2005-05-13
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

    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 85

    Assisted Solution

    by:Mike Tomlinson
    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

    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

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
    When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
    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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

    754 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now