BKSwindell
Dec 7th, 2010, 07:10 PM
Hey guys I cannot get WinSock running. I am running XP Pro, with VS2008.
I have downloaded mswinsck.ocx and installed in the c:\windows\system32 and syswow64 directories and ran regsvr32 C:\windows\System32\MSWINSCK.OCX and regsvr32 C:\windows\SysWOW64\MSWINSCK.OCX. I have added it to my tools panel. Once I add the control to my form, the form will not run. I get the error below. What am I doing wrong? It I cannot even run other winsock examples. Please help. Thanks.
Brad Swindell
An error occurred creating the form. See Exception.InnerException for details. The error is: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
--------------------------------------------------------------------
System.InvalidOperationException was unhandled
Message="An error occurred creating the form. See Exception.InnerException for details. The error is: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"
Source="winsock_test"
StackTrace:
at winsock_test.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
at winsock_test.My.MyProject.MyForms.get_Form1()
at winsock_test.My.MyApplication.OnCreateMainForm() in C:\Documents and Settings\brads\Local Settings\Application Data\Temporary Projects\winsock_test\My Project\Application.Designer.vb:line 35
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at winsock_test.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Runtime.InteropServices.COMException
Message="Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"
Source="System.Windows.Forms"
ErrorCode=-2147221164
StackTrace:
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
at winsock_test.Form1.InitializeComponent() in C:\Documents and Settings\brads\Local Settings\Application Data\Temporary Projects\winsock_test\Form1.Designer.vb:line 47
at winsock_test.Form1..ctor()
InnerException:
I have downloaded mswinsck.ocx and installed in the c:\windows\system32 and syswow64 directories and ran regsvr32 C:\windows\System32\MSWINSCK.OCX and regsvr32 C:\windows\SysWOW64\MSWINSCK.OCX. I have added it to my tools panel. Once I add the control to my form, the form will not run. I get the error below. What am I doing wrong? It I cannot even run other winsock examples. Please help. Thanks.
Brad Swindell
An error occurred creating the form. See Exception.InnerException for details. The error is: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
--------------------------------------------------------------------
System.InvalidOperationException was unhandled
Message="An error occurred creating the form. See Exception.InnerException for details. The error is: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"
Source="winsock_test"
StackTrace:
at winsock_test.My.MyProject.MyForms.Create__Instance__[T](T Instance) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 190
at winsock_test.My.MyProject.MyForms.get_Form1()
at winsock_test.My.MyApplication.OnCreateMainForm() in C:\Documents and Settings\brads\Local Settings\Application Data\Temporary Projects\winsock_test\My Project\Application.Designer.vb:line 35
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
at winsock_test.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Runtime.InteropServices.COMException
Message="Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))"
Source="System.Windows.Forms"
ErrorCode=-2147221164
StackTrace:
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense(Guid clsid)
at System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
at System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
at winsock_test.Form1.InitializeComponent() in C:\Documents and Settings\brads\Local Settings\Application Data\Temporary Projects\winsock_test\Form1.Designer.vb:line 47
at winsock_test.Form1..ctor()
InnerException: