// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; using System.Runtime.InteropServices; class MainClass { [DllImport("D:\\IDEProjects\\VisualStudio\\PtrPtrPtr\\Release\\PtrPtrPtr.dll")] private static extern IntPtr ptrptrptr(); public static void Main(string[] args) { IntPtr ppp = ptrptrptr(); for(int i = 0; i < 2; i++) { IntPtr pp = Marshal.ReadIntPtr(ppp, 4*i); for(int j = 0; j < 3; j++) { IntPtr p = Marshal.ReadIntPtr(pp, 4*j); for(int k = 0; k < (3*i+j+1); k++) { byte b = Marshal.ReadByte(p, k); Console.Write((char)b); } Console.WriteLine(); } } } }