I have an dll in that class the following method
[MethodImpl(MethodImplOptions.PreserveSig | MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
bool SetIPAddress([MarshalAs(UnmanagedType.BStr)] ref string lpszIPAddress, int dwPortNumber, int dwPassWord);
How do I pass values to this method:
public FP_CLOCKLib._DFP_CLOCK ff = new FP_CLOCKLib.FP_CLOCK();
reffered to create instance like "Catastrophic failure" when accessing an OCX library from C#
bool status = ff.SetIPAddress(ref ip, 5005, 0);
it threw error
System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) at FP_CLOCKLib.FP_CLOCKClass.SetIPAddress(String& lpszIPAddress, Int32 dwPortNumber, Int32 dwPassWord)
This could be your issue, the following steps could help.
This problem is a cryptic manifestation of a known issue with URLMON.dll. KB945701 - http://support.microsoft.com/default.aspx?scid=kb;EN-US;945701
We performed the following fix which resolved the issue:
Note If the FEATURE_IGNORE_ZONES_INITIALIZATION_FAILURE_KB945701 subkey does not exist, you must manually create it
https://forums.iis.net/t/1148764.aspx?Catastrophic+failure+Exception+from+HRESULT+0x8000FFFF+E_UNEXPECTED+
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With