1 // IOFunctions.cs created with MonoDevelop
2 // User: alan at 14:43 20/10/2008
4 // To change standard headers go to Edit->Preferences->Coding->Standard Headers
8 using System.Runtime.InteropServices;
12 // this matches a native 'enum', don't modify
20 [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)]
21 internal delegate IntPtr OpenFileFunc (IntPtr opaque, string filename, int mode);
23 [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)]
24 internal delegate /* uLong */ uint ReadFileFunc32 (IntPtr opaque, IntPtr stream, IntPtr buffer, /* uLong */ uint size);
26 [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)]
27 internal delegate /* uLong */ uint WriteFileFunc32 (IntPtr opaque, IntPtr stream, IntPtr buffer, /* uLong */ uint size);
29 [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)]
30 internal delegate /* long */ int TellFileFunc32 (IntPtr opaque, IntPtr stream);
32 [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)]
33 internal delegate /* long */ int SeekFileFunc32 (IntPtr opaque, IntPtr stream, /* uLong */ uint offset, int origin);
35 [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)]
36 internal delegate /* uLong */ ulong ReadFileFunc64 (IntPtr opaque, IntPtr stream, IntPtr buffer, /* uLong */ ulong size);
38 [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)]
39 internal delegate /* uLong */ ulong WriteFileFunc64 (IntPtr opaque, IntPtr stream, IntPtr buffer, /* uLong */ ulong size);
41 [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)]
42 internal delegate /* long */ long TellFileFunc64 (IntPtr opaque, IntPtr stream);
44 [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)]
45 internal delegate /* long */ long SeekFileFunc64 (IntPtr opaque, IntPtr stream, /* uLong */ ulong offset, int origin);
47 [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)]
48 internal delegate int CloseFileFunc (IntPtr opaque, IntPtr stream);
50 [UnmanagedFunctionPointerAttribute (CallingConvention.Cdecl)]
51 internal delegate int TestErrorFileFunc (IntPtr opaque, IntPtr stream);
53 [StructLayout (LayoutKind.Sequential)]
54 internal struct ZlibFileFuncDef32
56 [MarshalAs (UnmanagedType.FunctionPtr)] public OpenFileFunc zopen_file;
57 [MarshalAs (UnmanagedType.FunctionPtr)] public ReadFileFunc32 zread_file;
58 [MarshalAs (UnmanagedType.FunctionPtr)] public WriteFileFunc32 zwrite_file;
59 [MarshalAs (UnmanagedType.FunctionPtr)] public TellFileFunc32 ztell_file;
60 [MarshalAs (UnmanagedType.FunctionPtr)] public SeekFileFunc32 zseek_file;
61 [MarshalAs (UnmanagedType.FunctionPtr)] public CloseFileFunc zclose_file;
62 [MarshalAs (UnmanagedType.FunctionPtr)] public TestErrorFileFunc zerror_file;
66 [StructLayout (LayoutKind.Sequential)]
67 internal struct ZlibFileFuncDef64
69 [MarshalAs (UnmanagedType.FunctionPtr)] public OpenFileFunc zopen_file;
70 [MarshalAs (UnmanagedType.FunctionPtr)] public ReadFileFunc64 zread_file;
71 [MarshalAs (UnmanagedType.FunctionPtr)] public WriteFileFunc64 zwrite_file;
72 [MarshalAs (UnmanagedType.FunctionPtr)] public TellFileFunc64 ztell_file;
73 [MarshalAs (UnmanagedType.FunctionPtr)] public SeekFileFunc64 zseek_file;
74 [MarshalAs (UnmanagedType.FunctionPtr)] public CloseFileFunc zclose_file;
75 [MarshalAs (UnmanagedType.FunctionPtr)] public TestErrorFileFunc zerror_file;