Ejemplo n.º 1
0
        private unsafe void SetGameModeTextCallStackBase(string textString)
        {
            var data = stackalloc int[1];

            var len       = NativeUtils.GetByteCount(textString);
            var textBytes = stackalloc byte[len];

            NativeUtils.GetBytes(textString, textBytes, len);


            data[0] = NativeUtils.BytePointerToInt(textBytes);

            Interop.FastNativeInvoke(new IntPtr(9999), "s", data);
        }
Ejemplo n.º 2
0
        private unsafe void SetGameModeTextCallStackBase(string textString)
        {
            // prototype to inspect IL code for developing code generator
            var data = stackalloc int[1];

            var len       = NativeUtils.GetByteCount(textString);
            var textBytes = stackalloc byte[len];

            NativeUtils.GetBytes(textString, textBytes, len);


            data[0] = NativeUtils.BytePointerToInt(textBytes);

            Interop.FastNativeInvoke(new IntPtr(9999), "s", data);
        }