private IntPtr convertColumnSetToIntPtr(SuperLogTableColumnSet colSet) { VMDIR_SUPERLOG_TABLE_COLUMN_SET colSetStruct = colSet.ToStruct(); IntPtr ptr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(VMDIR_SUPERLOG_TABLE_COLUMN_SET))); Marshal.StructureToPtr(colSetStruct, ptr, false); return(ptr); }
public VMDIR_SUPERLOG_TABLE_COLUMN_SET ToStruct() { VMDIR_SUPERLOG_TABLE_COLUMN_SET colSetStruct = new VMDIR_SUPERLOG_TABLE_COLUMN_SET(); colSetStruct.isColumnSet = new UInt32[_colNum]; foreach (SuperLogTableColumn col in this) { colSetStruct.isColumnSet[(int)col] = 1; } return colSetStruct; }
public VMDIR_SUPERLOG_TABLE_COLUMN_SET ToStruct() { VMDIR_SUPERLOG_TABLE_COLUMN_SET colSetStruct = new VMDIR_SUPERLOG_TABLE_COLUMN_SET(); colSetStruct.isColumnSet = new UInt32[_colNum]; foreach (SuperLogTableColumn col in this) { colSetStruct.isColumnSet[(int)col] = 1; } return(colSetStruct); }