Beispiel #1
0
        /// <summary>
        /// Returns the unmanaged opentemporarytable that represents this managed class.
        /// </summary>
        /// <returns>
        /// A native (interop) version of the JET_OPENTEMPORARYTABLE.
        /// </returns>
        internal NATIVE_OPENTEMPORARYTABLE GetNativeOpenTemporaryTable()
        {
            this.CheckDataSize();
            var openTemporaryTable = new NATIVE_OPENTEMPORARYTABLE();

            openTemporaryTable.cbStruct    = checked ((uint)Marshal.SizeOf(openTemporaryTable));
            openTemporaryTable.ccolumn     = checked ((uint)this.ccolumn);
            openTemporaryTable.grbit       = (uint)this.grbit;
            openTemporaryTable.cbKeyMost   = checked ((uint)this.cbKeyMost);
            openTemporaryTable.cbVarSegMac = checked ((uint)this.cbVarSegMac);
            return(openTemporaryTable);
        }
 public void Setup()
 {
     this.managed = new JET_OPENTEMPORARYTABLE()
     {
         prgcolumndef = new JET_COLUMNDEF[2],
         prgcolumnid = new JET_COLUMNID[2],
         ccolumn = 2,
         grbit = TempTableGrbit.SortNullsHigh,
         cbKeyMost = 3,
         cbVarSegMac = 4,
     };
     this.native = this.managed.GetNativeOpenTemporaryTable();
 }
 /// <summary>
 /// Returns the unmanaged opentemporarytable that represents this managed class.
 /// </summary>
 /// <returns>
 /// A native (interop) version of the JET_OPENTEMPORARYTABLE.
 /// </returns>
 internal NATIVE_OPENTEMPORARYTABLE GetNativeOpenTemporaryTable()
 {
     this.CheckDataSize();
     var openTemporaryTable = new NATIVE_OPENTEMPORARYTABLE();
     openTemporaryTable.cbStruct = checked((uint)Marshal.SizeOf(openTemporaryTable));
     openTemporaryTable.ccolumn = checked((uint) this.ccolumn);
     openTemporaryTable.grbit = (uint)this.grbit;
     openTemporaryTable.cbKeyMost = checked((uint) this.cbKeyMost);
     openTemporaryTable.cbVarSegMac = checked((uint) this.cbVarSegMac);
     return openTemporaryTable;
 }