Click here to Skip to main content
14,668,823 members
Rate this:
Please Sign up or sign in to vote.
See more:
Back in VS2017, When referencing an Activex/OCX two files were created and referenced on Visual Studio

Interop.XYZLib.dll
AxInterop.XYZLib.dll

from there I was able to create a wrapper around AxInterop.XYZLib.dll that exposed the methods and properties of the OCX as if they were native.

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.

Thank you

What I have tried:

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?
Posted
Updated 10-Jul-20 5:24am
Comments
MadMyche 9-Jul-20 11:27am
   
Why did you delete the original question?
lenniscata 9-Jul-20 11:28am
   
I wanted to change the title to make it clearer.
OriginalGriff 9-Jul-20 11:33am
   
You can edit questions using the "Improve question" button at the bottom (wave the mouse over your question and it'll appear) and edit the text, title, tags, and "what I have tried" sections.

Deleting questions looks like a "I didn't get the answer I wanted" fit of pique, and generally doesn't get you any improvements. It does annoy some of us though ...
lenniscata 9-Jul-20 11:40am
   
Ok, got it, thank you,
MadMyche 9-Jul-20 11:34am
   
That's what the Improve Question widget is for
Patrice T 9-Jul-20 12:33pm
   
Use Improve question to update your question.
Patrice T 9-Jul-20 11:29am
   
What says microsoft ?
lenniscata 9-Jul-20 11:39am
   
To use AxImp.exe, it should create both files but it comes back with "Did not find a registered ActiveX control in ...", but I registered the control.

Thank you
CHill60 9-Jul-20 12:37pm
   
Did you use the correct version of RegSvr32.exe to register the OCX? 32bit vs 64bit
lenniscata 9-Jul-20 16:09pm
   
Yes, 32 bit, I got the message "DLLRegisterServer in ArsOle.ocx succeded." and I'm still able to use the version compiled on VS2017 with not issue. I just can't import it again to a new project. Thank you
MadMyche 9-Jul-20 12:35pm
   
Is your app 32 or 64 bit? And that ActiveX?
lenniscata 9-Jul-20 16:12pm
   
It is 32 bit COM library that will be access by a 32 bit application. running on Windows 10, build 2004, VS 2019 all patched. Thank you,
CHill60 10-Jul-20 5:40am
   
Not sure where all of the comments have gone, but try using Sysinternals Process Utilities - Windows Sysinternals | Microsoft Docs[^] - specifically the Process Monitor and Process Explorer tools. They will help you find out which dependant DLL it's moaning about or where it's looking for it
lenniscata 10-Jul-20 14:18pm
   
Thank you, I was able to generate the files with AxImp, but VS2019 is still crashing, although the VS2017 solution is working. I'll try your suggestion and post here what I find.

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

The most correct answer is, don't use activex... It's a known security risk and is to be avoided at all costs.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month



CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100