~ruther/NosSmooth.Local

b4c40c38854db81ec104ce8d54f6ea0440a71bf6 — Rutherther 2 years ago fbc687d
feat(samples): update samples to receive nuint and return int in main method
M src/Samples/HighLevel/SimplePiiBot/DllMain.cs => src/Samples/HighLevel/SimplePiiBot/DllMain.cs +2 -1
@@ 38,7 38,7 @@ public class DllMain
    /// Represents the dll entrypoint method.
    /// </summary>
    [UnmanagedCallersOnly(EntryPoint = "Main")]
    public static void Main()
    public static int Main(nuint data)
    {
        AllocConsole();
        new Thread


@@ 55,6 55,7 @@ public class DllMain
                }
            }
        ).Start();
        return 0;
    }

    /// <summary>

M src/Samples/LowLevel/InterceptNameChanger/DllMain.cs => src/Samples/LowLevel/InterceptNameChanger/DllMain.cs +2 -1
@@ 24,7 24,7 @@ namespace InterceptNameChanger
        /// The main entrypoint method of the dll.
        /// </summary>
        [UnmanagedCallersOnly(EntryPoint = "Main")]
        public static void Main()
        public static int Main(nuint data)
        {
            AllocConsole();
            Console.WriteLine("Hello from InterceptNameChanger DllMain entry point.");


@@ 40,6 40,7 @@ namespace InterceptNameChanger
                    Console.WriteLine(e.ToString());
                }
            }).Start();
            return 0;
        }
    }
}
\ No newline at end of file

M src/Samples/LowLevel/SimpleChat/DllMain.cs => src/Samples/LowLevel/SimpleChat/DllMain.cs +2 -1
@@ 22,11 22,12 @@ public class DllMain
    /// The main entrypoint method of the dll.
    /// </summary>
    [UnmanagedCallersOnly(EntryPoint = "Main")]
    public static void Main()
    public static int Main(nuint data)
    {
        AllocConsole();
        Console.WriteLine("Hello from SimpleChat DllMain entry point.");

        new Thread(() => new SimpleChat().RunAsync().GetAwaiter().GetResult()).Start();
        return 0;
    }
}
\ No newline at end of file

M src/Samples/LowLevel/WalkCommands/DllMain.cs => src/Samples/LowLevel/WalkCommands/DllMain.cs +2 -1
@@ 24,7 24,7 @@ public class DllMain
    /// Represents the dll entrypoint method.
    /// </summary>
    [UnmanagedCallersOnly(EntryPoint = "Main")]
    public static void Main()
    public static int Main(nuint data)
    {
        AllocConsole();
        new Thread(() =>


@@ 38,5 38,6 @@ public class DllMain
                Console.WriteLine(e.ToString());
            }
        }).Start();
        return 0;
    }
}
\ No newline at end of file

Do not follow this link