Skip to content

WPR Research: CutTheRope (Silverlight type)

Media Explorer edited this page May 2, 2023 · 3 revisions

WPR Research: CutTheRope (Silverlight type)

Hack (patch) to obtain SL-type game installing

WPR project - ApplicationInstaller.cs

Find the code fragment:

                if (!Enum.TryParse(runtimeTypeAttrb.Value, true, out ApplicationType runtimeTypeParsed))
                {
                   
                    Debug.WriteLine
                    (
                        "[warn] " +
                        ApplicationInstallError.NotSupportedAppType + " | " +
                        "(" + runtimeTypeAttrb.Value +")" + 
                        app + " | " +
                        dataFolderProduct
                    );

                   // comment it for to obtain SL-type game installing
                        return ( ApplicationInstallError.NotSupportedAppType, app,
                           dataFolderProduct + ":" + runtimeTypeAttrb.Value );
                }

Comment return (...);

Result: image

Game Start Exception

[ex] Game run error:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.MethodAccessException: Attempt by method 'CtrExpSlXna.App..ctor()' to access method 'WPR.WindowsCompability.Application..ctor()' failed.
   at CtrExpSlXna.App..ctor()
   --- End of inner exception stack trace ---
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)
   at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)
   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)
   at System.Activator.CreateInstance(Type type)
   at WPR.ApplicationLaunch.Start(Application app, Action`1 requestOrientation) in C:\Users\Admin\source\repos\WPR\Core\WPR\ApplicationLaunch.cs:line 83
   at WPR.UI.Views.MainWindowDesktop.<.ctor>b__1_0(Object sender, ApplicationLaunchRequestArgs args) in C:\Users\Admin\source\repos\WPR\UI\WPR.UI\Views\MainWindowDesktop.axaml.cs:line 47

Possible reason: some WPR.WindowsCompability.Application..ctor method not found at WPR.WindowsCOmpatibility project - Application.cs