Strange Side By Side issue and error handler question
Posted: Thu May 06, 2021 9:42 pm
1 My DotNet DLL used from VO is registered using a manifest and MT.exe from VS. That normally works fine, but now I found something strange. I installed my changed programs with all DLL's etc on a another Pc for testing, but got: a Side By Side error, in the log it says:
Unable to create activation context for '(myexe.exe). Unable to find dependent assembly DotNetLibForVO,processorArchitecture="msil",version="1.0.1.1". Use sxstrace.exe for a detailed diagnosis.
I thought probably mt.exe didn't execute, this can cause it, copied the DLL from a few hours earlier from my regular environment which worked fine, and problem was gone.
But now I copied the 'faulty' DLL back from where I kept it temporarily, and this time the exe started without any problem. So with the same files where it didn't start originally.
How is that possible?
2 Another thing I don't understand is this. In the code below a window with the WebVIew2 component, which is the Chromium Edge runtime, is displayed. If that runtime is not installed (it will install automatically with newer W10 updates) the code below should generate yield a runtime error and the RECOVER has some code to ask the user to install (here only the URL execution)
I have seen that working but what happened here was that I briefly see the WPF window, without the (missing) component but instead of reaching RECOVER I get a VO window saying:
No errorblock
Error in Errorhandler
(in the ShowEmailInWebView2 which is the X# method in the DLL starting the display of that window).
Why doesn't the program reach RECOVER?
BEGIN SEQUENCE
bErrorHandler := {|oError| _Break(oError)}
bLastHandler := ErrorBlock(bErrorHandler)
oDotNet:= OLEAutoObject{"DotNetLibForVO.VoDotNetClass"}
IF !oDotNet:Finit
.....
ENDIF
IF !oDotNet:ShowEmailInWebView2(cHTML,cCaption) // When this can't be finalized due to a missing WebVIew2 runtime, it should go to recover
ErrorBox{,Vt(MSG_NOCONNECTION,"No connection")}:Show()
RETURN FALSE
ENDIF
RECOVERShellExecute(NULL, String2Psz("open"), String2Psz("https://go.microsoft.com/fwlink/p/?LinkId=2124703"), NULL_PSZ, NULL_PSZ, SW_SHOW)
END
ErrorBlock(bLastHandler)
Dick
Unable to create activation context for '(myexe.exe). Unable to find dependent assembly DotNetLibForVO,processorArchitecture="msil",version="1.0.1.1". Use sxstrace.exe for a detailed diagnosis.
I thought probably mt.exe didn't execute, this can cause it, copied the DLL from a few hours earlier from my regular environment which worked fine, and problem was gone.
But now I copied the 'faulty' DLL back from where I kept it temporarily, and this time the exe started without any problem. So with the same files where it didn't start originally.
How is that possible?
2 Another thing I don't understand is this. In the code below a window with the WebVIew2 component, which is the Chromium Edge runtime, is displayed. If that runtime is not installed (it will install automatically with newer W10 updates) the code below should generate yield a runtime error and the RECOVER has some code to ask the user to install (here only the URL execution)
I have seen that working but what happened here was that I briefly see the WPF window, without the (missing) component but instead of reaching RECOVER I get a VO window saying:
No errorblock
Error in Errorhandler
(in the ShowEmailInWebView2 which is the X# method in the DLL starting the display of that window).
Why doesn't the program reach RECOVER?
BEGIN SEQUENCE
bErrorHandler := {|oError| _Break(oError)}
bLastHandler := ErrorBlock(bErrorHandler)
oDotNet:= OLEAutoObject{"DotNetLibForVO.VoDotNetClass"}
IF !oDotNet:Finit
.....
ENDIF
IF !oDotNet:ShowEmailInWebView2(cHTML,cCaption) // When this can't be finalized due to a missing WebVIew2 runtime, it should go to recover
ErrorBox{,Vt(MSG_NOCONNECTION,"No connection")}:Show()
RETURN FALSE
ENDIF
RECOVERShellExecute(NULL, String2Psz("open"), String2Psz("https://go.microsoft.com/fwlink/p/?LinkId=2124703"), NULL_PSZ, NULL_PSZ, SW_SHOW)
END
ErrorBlock(bLastHandler)
Dick