GimpParamDef[] GetParamDef(int num_args, IntPtr argsPtr) { var paramDef = new GimpParamDef[num_args]; var type = typeof(GimpParamDef); var seq = new IntPtrSeq(argsPtr, num_args, Marshal.SizeOf(type)); seq.ForEach((i, ptr) => { paramDef[i] = (GimpParamDef)Marshal.PtrToStructure(ptr, type); }); return(paramDef); }
public static extern void gimp_install_procedure( string name, string blurb, string help, string author, string copyright, string date, string menu_path, string image_types, PDBProcType type, int n_params, int n_return_vals, GimpParamDef[] _params, GimpParamDef[] return_vals);
GimpParamDef[] GetParamDef(int num_args, IntPtr argsPtr) { var paramDef = new GimpParamDef[num_args]; var type = typeof(GimpParamDef); var seq = new IntPtrSeq(argsPtr, num_args, Marshal.SizeOf(type)); seq.ForEach((i, ptr) => { paramDef[i] = (GimpParamDef) Marshal.PtrToStructure(ptr, type); }); return paramDef; }
GimpParamDef[] GetParamDef(int num_args, IntPtr argsPtr) { var paramDef = new GimpParamDef[num_args]; for (int i = 0; i < num_args; i++) { paramDef[i] = (GimpParamDef) Marshal.PtrToStructure(argsPtr, typeof(GimpParamDef)); argsPtr = (IntPtr)((int)argsPtr + Marshal.SizeOf(paramDef[i])); } return paramDef; }