I am using AxRDPViewer COM component msdn for remote assistance and out of nowhere its complementary events like OnConnectionEstablished,OnConnectionAuthenticated e.t.c stopped to be raised.
The component is hosted in WPF window like this
<DockPanel Margin="1,0,1,0">
<WindowsFormsHost x:Name="_FORMS_HOST">
<WindowsFormsHost.Child>
<rdp:AxRDPViewer x:Name="RDP_VIEW" />
</WindowsFormsHost.Child>
</WindowsFormsHost>
</DockPanel>
The component itself seem to work and i get connection correctly but still no events at all. There are no errors or exception thrown so its hard to understand where is the problem coming from.
Hope someone has any idea where this could be coming from. Thanks!
Edit
It looks like the generated Com libraries are not generated correctly. I replaced them with the older versions i had in previous builds and events started to be raised as intended. The question is why generated libs AxInterop.RDPCOMAPILib.dll and Interop.RDPCOMAPILib.dll have those issues and how to get around it.
I am using latest VS 2019 if it makes any difference.
Thanks!
The problem it seems was that AxInterop for windows forms was not generated correctly so instead a local copy was used that probably mismatched with the interop library. Adding this to the project resolved the problem
<COMReference Include="RDPCOMAPILib.dll">
<Guid>cc802d05-ae07-4c15-b496-db9d22aa0a84</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>0</VersionMinor>
<WrapperTool>aximp</WrapperTool>
<Lcid>0</Lcid>
<Isolated>false</Isolated>
</COMReference>