ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/gr2lib/trunk/gr2lib/core/coreclasses/header/granny_file.cs
(Generate patch)

Comparing trunk/gr2lib/core/coreclasses/header/granny_file.cs (file contents):
Revision 94 by william, Sat Jul 17 05:09:42 2010 UTC vs.
Revision 97 by william, Sat Jul 17 05:53:44 2010 UTC

# Line 46 | Line 46 | namespace gr2lib.core.header
46              coreapi.FreeFile(NativeFilePointer);
47          }
48  
49
50        //internal static granny_file ReadFromMemory(IntPtr pointer)
51        //{
52        //    if (pointer == IntPtr.Zero) return null;
53        //    gr2lib.core.coretypes.native.granny_file native = Helpers.ReadFromMemory<gr2lib.core.coretypes.native.granny_file>(pointer);
54        //    granny_file managed = new granny_file();
55        //    managed.NativePointer = pointer;
56
57        //    // process
58          
59
60        //    return managed;
61        //}
49          internal static void ReadFromMemory(string filename, ref granny_file grn_file)
50          {
51              //if (grn_file.NativePointer == IntPtr.Zero) return;
# Line 101 | Line 88 | namespace gr2lib.core.header
88              grn_file = managed;
89          }
90  
91 <        //public static void ReadFromFile(string filename, out granny_file grn_file)
105 <        //{
106 <        //    grn_file = new granny_file();
107 <        //    grn_file.NativePointer = coreapi.GrannyReadEntireFile(filename);
108 <        //    if (grn_file.NativePointer == null || grn_file.NativePointer == IntPtr.Zero)
109 <        //    {
110 <        //        Console.WriteLine("Error: unable to load {0} as a Granny file.", filename);
111 <        //    }
112 <
113 <        //    grn_file.NativeFilePointer = coreapi.GetFileInfo(grn_file.NativePointer);
114 <        //    ReadFromMemory(out grn_file);
115 <        //    coreapi.FreeFile(grn_file.NativePointer);
116 <        //}
91 >
92  
93          public static granny_file ReadFromFile(string filename)
94          {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines