I need to code an ActiveX array and am having trouble with errors.

I modeled my program after microsoft code at:

http://msdn.microsoft.com/en-us/libr...ualcnetanchor7

Program compiles and appears to work OK until I try to connect thru the ActiveX control. I get the following error:

Error with TWS array: Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown.

I have no idea how to trace or debug this situation. The error appears right at the ActiveX.connect call and I am unable to step further in the code.

Does anyone know how to go about troubleshooting this or does this error mean anything to anyone?

Thanks in Advance