I have a windows forms application that uses legacy vendor com objects. I've registered the ocx. The VS2010 project succeeds in referencing the axFOO dll. The code works in Visual studio running on Windows 7. The setup project installs correctly and if installed on my local PC (win7) it works. When I attempt to install on a windows 2008 VM, installation is successful, when the portion of the application that uses the object is executed it fails with this error:
Unable to get the window handle for the 'xx' control. Windowless ActiveX controls are not supported.
I have the ocx file registered. I found several articles about Vista and DEP. Nothing regarding the difference in Win7 and win2008. I have DEP turned off right now using the command
bcdedit.exe /set {current} nx AlwaysOff
This did not help.
Application is written in C#. Any suggestions? I'm more accustomed to ASP.net. COM is new to me. Thanks.
Also, I've identified the exception is triggered here during Initialize method:
((System.ComponentModel.ISupportInitialize)(this.myCtrl)).EndInit();
More details: I've installed VS 2010 on the Win2008 machine to try and make the two more similar with no luck. Same problem occurs running in VS2010 debug mode. -not stopping in VS when exception hits. Although I didn't expect it to.