Answered by:
Visual studio 2019 doesn't generate wrappers for Activex/OCX

Question
-
Back in VS2017, when referencing an OCX two files were created and referenced:
- Interop.XYZLib.dll
- AxInterop.XYZLib.dll
from there I was able to create a wrapper around AxInterop.XYZLib.dll that exposes the methods and properties of the OCX as if they are native. Now after installing VS2019 only Interop.XYZLib.dll is generated. Even if I go back to VS2017 the behavior is the same, only one is generated, and trying to use it causes a catastrophic failure. Other answers suggest to use AxImp.exe, I tried, only to have an error saying "Did not find a registered ActiveX control in ...", that's confusing since the OCX is registered with RegSvr32.exe, any ideas?
Thank you
Luis
Luis
- Edited by LazyCod3r Thursday, July 9, 2020 3:43 PM
- Moved by Xingyu ZhaoMicrosoft contingent staff Friday, July 10, 2020 2:09 AM
Thursday, July 9, 2020 12:00 PM
Answers
-
Something here may help.
or try asking for help over here.
https://social.msdn.microsoft.com/Forums/sharepoint/en-US/home?category=vslanguages
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Marked as answer by LazyCod3r Friday, July 10, 2020 12:28 PM
Friday, July 10, 2020 2:19 AM
All replies
-
Hi LazyCod3r,
Thank you for posting here.
In order to help you find the correct forum to go ask questions, I have moved the thread to 'where is the forum for... ?' forum.
Thank you for your understanding.
Best Regards,
Xingyu Zhao
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Friday, July 10, 2020 2:08 AM -
Something here may help.
or try asking for help over here.
https://social.msdn.microsoft.com/Forums/sharepoint/en-US/home?category=vslanguages
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Marked as answer by LazyCod3r Friday, July 10, 2020 12:28 PM
Friday, July 10, 2020 2:19 AM -
Hi Dave, thank you for the input, I used AxImp.exe as described on the link you've provide and was able to make it work, well sort of..., it does generate two files but something seems to be odd about it. VS2019 doesn't seem to like those files, and why now it seems broken? before Visual Studio was able to generate those files for me now it doesn't. I'm sure it is a setting or something silly, but I'll keep looking.
Cheers,
Luis
Luis
Friday, July 10, 2020 1:22 PM