Esempio n. 1
0
        public int gsdll_stdout(IntPtr intGSInstanceHandle, IntPtr strz, int intBytes)
        {
            byte[]   numArray = new byte[intBytes];
            GCHandle gcHandle = GCHandle.Alloc((object)numArray, GCHandleType.Pinned);

            PDFConvert.CopyMemory(gcHandle.AddrOfPinnedObject(), strz, (uint)intBytes);
            IntPtr num = IntPtr.Zero;

            gcHandle.Free();
            string str = "";

            for (int index = 0; index < intBytes; ++index)
            {
                str += (string)(object)(char)numArray[index];
            }
            this.output.Append(str);
            return(intBytes);
        }
Esempio n. 2
0
        public int gsdll_stdin(IntPtr intGSInstanceHandle, IntPtr strz, int intBytes)
        {
            if (intBytes == 0)
            {
                return(0);
            }
            int num1 = Console.Read();

            if (num1 == -1)
            {
                return(0);
            }
            GCHandle gcHandle = GCHandle.Alloc((object)(byte)num1, GCHandleType.Pinned);
            IntPtr   Source   = gcHandle.AddrOfPinnedObject();

            PDFConvert.CopyMemory(strz, Source, 1U);
            IntPtr num2 = IntPtr.Zero;

            gcHandle.Free();
            return(1);
        }