I've never dealt with ActiveX controls but I wanted to add one to an an existing MFC project using VS2019. I created a dialog in the resource editor, I added the ActiveX control I wanted to play with (RDP - tried different versions), resized it. Then closed the tab, when I try to open that dialog in the resource editor I get:
---------------------------
Microsoft Visual Studio
---------------------------
The ActiveX control "Microsoft RDP Client Control (redistributable) - version 11" could not be instantiated.
---------------------------
OK
---------------------------
What's wrong and how do I fix it?
Also, what is the difference between the ones that say (redistributable) vs the ones that don't have that?
TIA!!
P.S. After that error above, if I try to open again I get:
An error occurred while initializing the frame's content
System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowPaneDocumentObject.Init(Boolean initSize)
at Microsoft.VisualStudio.Platform.WindowManagement.DocumentObjectSite.InitializeDocumentObject(Object punkView)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.InitializeDocumentSite(Boolean creatingStubFrame, Boolean replacingStubView, Object punkView, Object punkData, IServiceProvider pServiceProvider, IVsUIHierarchy pUIHierarchy, UInt32 vsid)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowManagerService.CreateContentPane(FrameMoniker frameMoniker, Boolean isDocument, String lpstrMkDoc, UInt32 eCreateWindowFlags, Object punkView, Object punkData, IServiceProvider pServiceProvider, IVsUIHierarchy pUIHierarchy, UInt32 vsid, Guid rguidCmdUI, ViewGroup parent, IVsWindowFrame& ppWindowFrame)
File Path: Path\To\Resource.rc
Frame GUID: 177559e0-d141-11d0-92df-00a0c9138c45
Frame mode: VSFM_Float
Error Code: 0x80004005
regsvr32
? ActiveX objects have all kinds of weirdnesses, and are a very insecure and obsolete technology; if you can run way very far from it and try an alternative approach. – sergiol