207 references to UnsafeNativeMethods
System.Data (207)
fx\src\data\System\Data\Odbc\OdbcConnectionHandle.cs (12)
73retcode = UnsafeNativeMethods.SQLSetConnectAttrW(this, ODBC32.SQL_ATTR.AUTOCOMMIT, ODBC32.SQL_AUTOCOMMIT_OFF, (Int32)ODBC32.SQL_IS.UINTEGER); 167retcode = UnsafeNativeMethods.SQLEndTran(HandleType, handle, transactionOperation); 175retcode = UnsafeNativeMethods.SQLSetConnectAttrW(handle, ODBC32.SQL_ATTR.AUTOCOMMIT, ODBC32.SQL_AUTOCOMMIT_ON, (Int32)ODBC32.SQL_IS.UINTEGER); 195retcode = UnsafeNativeMethods.SQLDriverConnectW(this, ADP.PtrZero, connectionString, ODBC32.SQL_NTS, ADP.PtrZero, 0, out cbActualSize, (short)ODBC32.SQL_DRIVER.NOPROMPT); 215retcode = UnsafeNativeMethods.SQLDisconnect(handle); 224ODBC32.RetCode retcode = UnsafeNativeMethods.SQLGetConnectAttrW(this, attribute, buffer, buffer.Length, out cbActual); 230ODBC32.RetCode retcode = UnsafeNativeMethods.SQLGetFunctions(this, fFunction, out fExists); 236ODBC32.RetCode retcode = UnsafeNativeMethods.SQLGetInfoW(this, info, buffer, checked((short)buffer.Length), out cbActual); 242ODBC32.RetCode retcode = UnsafeNativeMethods.SQLGetInfoW(this, info, buffer, checked((short)buffer.Length), ADP.PtrZero); 248ODBC32.RetCode retcode = UnsafeNativeMethods.SQLSetConnectAttrW(this, attribute, value, length); 254ODBC32.RetCode retcode = UnsafeNativeMethods.SQLSetConnectAttrW(this, attribute, buffer, length); 260ODBC32.RetCode retcode = UnsafeNativeMethods.SQLSetConnectAttrW(this, attribute, transaction, length);
fx\src\data\System\Data\Odbc\OdbcEnvironmentHandle.cs (2)
35retcode = UnsafeNativeMethods.SQLSetEnvAttr( 47retcode = UnsafeNativeMethods.SQLSetEnvAttr(
fx\src\data\System\Data\Odbc\OdbcHandle.cs (8)
45retcode = UnsafeNativeMethods.SQLAllocHandle(handleType, IntPtr.Zero, out base.handle); 53retcode = UnsafeNativeMethods.SQLAllocHandle(handleType, parentHandle, out base.handle); 146ODBC32.RetCode retcode = UnsafeNativeMethods.SQLFreeHandle(handleType, handle); 176ODBC32.RetCode retcode = UnsafeNativeMethods.SQLGetDiagFieldW( 197ODBC32.RetCode retcode = UnsafeNativeMethods.SQLGetDiagRecW(HandleType, this, record, sb, out nativeError, message, checked((short)message.Capacity), out cchActual); 216ODBC32.RetCode retcode = UnsafeNativeMethods.SQLGetDescFieldW(this, checked((short)i), attribute, buffer, buffer.ShortLength, out numericAttribute); 222ODBC32.RetCode retcode = UnsafeNativeMethods.SQLSetDescFieldW(this, ordinal, type, value, 0); 228ODBC32.RetCode retcode = UnsafeNativeMethods.SQLSetDescFieldW(this, ordinal, type, value, 0);
fx\src\data\System\Data\Odbc\OdbcStatementHandle.cs (26)
75ODBC32.RetCode retcode = UnsafeNativeMethods.SQLBindCol(this, checked((ushort)columnNumber), targetType, buffer, length, srLen_or_Ind); 81ODBC32.RetCode retcode = UnsafeNativeMethods.SQLBindCol(this, checked((ushort)columnNumber), targetType, ADP.PtrZero, ADP.PtrZero, srLen_or_Ind); 87ODBC32.RetCode retcode = UnsafeNativeMethods.SQLBindParameter(this, 104ODBC32.RetCode retcode = UnsafeNativeMethods.SQLCancel(this); 110ODBC32.RetCode retcode = UnsafeNativeMethods.SQLCloseCursor(this); 117ODBC32.RetCode retcode = UnsafeNativeMethods.SQLColAttributeW(this, checked((short)columnNumber), fieldIdentifier, characterAttribute, characterAttribute.ShortLength, out stringLength, out result); 127ODBC32.RetCode retcode = UnsafeNativeMethods.SQLColumnsW(this, 142ODBC32.RetCode retcode = UnsafeNativeMethods.SQLExecute(this); 148ODBC32.RetCode retcode = UnsafeNativeMethods.SQLExecDirectW(this, commandText, ODBC32.SQL_NTS); 154ODBC32.RetCode retcode = UnsafeNativeMethods.SQLFetch(this); 160ODBC32.RetCode retcode = UnsafeNativeMethods.SQLFreeStmt(this, stmt); 166ODBC32.RetCode retcode = UnsafeNativeMethods.SQLGetData(this, 177ODBC32.RetCode retcode = UnsafeNativeMethods.SQLGetStmtAttrW(this, attribute, out value, ADP.PtrSize, out stringLength); 183ODBC32.RetCode retcode = UnsafeNativeMethods.SQLGetTypeInfo(this, fSqlType); 189ODBC32.RetCode retcode = UnsafeNativeMethods.SQLMoreResults(this); 195ODBC32.RetCode retcode = UnsafeNativeMethods.SQLNumResultCols(this, out columnsAffected); 201ODBC32.RetCode retcode = UnsafeNativeMethods.SQLPrepareW(this, commandText, ODBC32.SQL_NTS); 207ODBC32.RetCode retcode = UnsafeNativeMethods.SQLPrimaryKeysW(this, 219ODBC32.RetCode retcode = UnsafeNativeMethods.SQLProceduresW(this, 235ODBC32.RetCode retcode = UnsafeNativeMethods.SQLProcedureColumnsW(this, 251ODBC32.RetCode retcode = UnsafeNativeMethods.SQLRowCount(this, out result); 258ODBC32.RetCode retcode = UnsafeNativeMethods.SQLSetStmtAttrW(this, (int)attribute, value, (int)stringLength); 264ODBC32.RetCode retcode = UnsafeNativeMethods.SQLSpecialColumnsW(this, 277ODBC32.RetCode retcode = UnsafeNativeMethods.SQLStatisticsW(this, 292ODBC32.RetCode retcode = UnsafeNativeMethods.SQLStatisticsW(this, 305ODBC32.RetCode retcode = UnsafeNativeMethods.SQLTablesW(this,
fx\src\data\System\Data\OleDb\DBBindings.cs (1)
330internal OleDbHResult CreateAccessor(UnsafeNativeMethods.IAccessor iaccessor, int flags) {
fx\src\data\System\Data\OleDb\DBPropSet.cs (5)
49internal DBPropSet(UnsafeNativeMethods.IDBProperties properties, PropertyIDSet propidset, out OleDbHResult hr) : this() { 66internal DBPropSet(UnsafeNativeMethods.IRowsetInfo properties, PropertyIDSet propidset, out OleDbHResult hr) : this() { 83internal DBPropSet(UnsafeNativeMethods.ICommandProperties properties, PropertyIDSet propidset, out OleDbHResult hr) : this() { 102UnsafeNativeMethods.IErrorInfo errorInfo = null; 105OleDbHResult errorInfoHr = UnsafeNativeMethods.GetErrorInfo(0, out errorInfo); // 0 - IErrorInfo exists, 1 - no IErrorInfo
fx\src\data\System\Data\OleDb\OLEDB_Util.cs (1)
283static internal OleDbHResult GetErrorDescription(UnsafeNativeMethods.IErrorInfo errorInfo, OleDbHResult hresult, out string message) {
fx\src\data\System\Data\OleDb\OleDbCommand.cs (21)
47private UnsafeNativeMethods.ICommandText _icommandText; 345private UnsafeNativeMethods.IAccessor IAccessor() { 348return (UnsafeNativeMethods.IAccessor) _icommandText; 352internal UnsafeNativeMethods.ICommandProperties ICommandProperties() { 355return (UnsafeNativeMethods.ICommandProperties) _icommandText; 359private UnsafeNativeMethods.ICommandPrepare ICommandPrepare() { 362return (_icommandText as UnsafeNativeMethods.ICommandPrepare); 366private UnsafeNativeMethods.ICommandWithParameters ICommandWithParameters() { 369UnsafeNativeMethods.ICommandWithParameters value = (_icommandText as UnsafeNativeMethods.ICommandWithParameters); 382UnsafeNativeMethods.ICommandWithParameters commandWithParameters = ICommandWithParameters(); 399UnsafeNativeMethods.IAccessor iaccessor = IAccessor(); 407private void ApplyParameterBindings(UnsafeNativeMethods.ICommandWithParameters commandWithParameters, tagDBPARAMBINDINFO[] bindInfo) { 428UnsafeNativeMethods.ICommandText icmdtxt = _icommandText; 509UnsafeNativeMethods.ICommandText ict = Interlocked.Exchange<UnsafeNativeMethods.ICommandText>(ref _icommandText, null); 663UnsafeNativeMethods.IMultipleResults multipleResults = (UnsafeNativeMethods.IMultipleResults) executeResult; 1132UnsafeNativeMethods.ICommandPrepare icommandPrepare = ICommandPrepare(); 1161UnsafeNativeMethods.ICommandProperties icommandProperties = ICommandProperties(); 1207UnsafeNativeMethods.ICommandProperties icommandProperties = ICommandProperties();
fx\src\data\System\Data\OleDb\OleDbConnection.cs (4)
268internal UnsafeNativeMethods.ICommandText ICommandText() { 496internal void OnInfoMessage(UnsafeNativeMethods.IErrorInfo errorInfo, OleDbHResult errorCode) { 586UnsafeNativeMethods.IErrorInfo errorInfo = null; 587OleDbHResult hr = UnsafeNativeMethods.GetErrorInfo(0, out errorInfo); // 0 - IErrorInfo exists, 1 - no IErrorInfo
fx\src\data\System\Data\OleDb\OleDbConnectionInternal.cs (10)
221internal UnsafeNativeMethods.ICommandText ICommandText() { 237return (UnsafeNativeMethods.ICommandText)icommandText; 261UnsafeNativeMethods.ITransactionLocal value = (unknown as UnsafeNativeMethods.ITransactionLocal); 371UnsafeNativeMethods.IDBInfo dbInfo = wrapper.Value; 443UnsafeNativeMethods.IDBInfo dbInfo = wrapper.Value; 500UnsafeNativeMethods.IDBInfo dbInfo = wrapper.Value; 534UnsafeNativeMethods.IDBSchemaRowset dbSchemaRowset = wrapper.Value; 577UnsafeNativeMethods.IDBSchemaRowset dbSchemaRowset = wrapper.Value; 582UnsafeNativeMethods.IRowset rowset = null;
fx\src\data\System\Data\OleDb\oledbconnectionstring.cs (4)
86internal UnsafeNativeMethods.IUnknownQueryInterface DangerousDataSourceIUnknownQueryInterface; 87internal UnsafeNativeMethods.IDBInitializeInitialize DangerousIDBInitializeInitialize; 88internal UnsafeNativeMethods.IDBCreateSessionCreateSession DangerousIDBCreateSessionCreateSession; 89internal UnsafeNativeMethods.IDBCreateCommandCreateCommand DangerousIDBCreateCommandCreateCommand;
fx\src\data\System\Data\OleDb\OleDbDataAdapter.cs (15)
237UnsafeNativeMethods.ADORecordsetConstruction recordset = (adodb as UnsafeNativeMethods.ADORecordsetConstruction); 238UnsafeNativeMethods.ADORecordConstruction record = null; 246activeConnection = ((UnsafeNativeMethods.Recordset15)adodb).get_ActiveConnection(); 255record = (adodb as UnsafeNativeMethods.ADORecordConstruction); 283OleDbHResult hr = ((UnsafeNativeMethods.Recordset15)adodb).NextRecordset(out recordsAffected, out nextresult); // MDAC 78415 289UnsafeNativeMethods.IErrorInfo errorInfo = null; 290UnsafeNativeMethods.GetErrorInfo(0, out errorInfo); 303recordset = (UnsafeNativeMethods.ADORecordsetConstruction) adodb; 334private int FillFromRecordset(Object data, UnsafeNativeMethods.ADORecordsetConstruction recordset, string srcTable, out bool incrementResultCount) { 389private int FillFromRecord(Object data, UnsafeNativeMethods.ADORecordConstruction record, string srcTable) { 435hr = ((UnsafeNativeMethods.Recordset15)value).Close(); // MDAC 78415 440hr = ((UnsafeNativeMethods._ADORecord)value).Close(); // MDAC 78415 444UnsafeNativeMethods.IErrorInfo errorInfo = null; 445UnsafeNativeMethods.GetErrorInfo(0, out errorInfo);
fx\src\data\System\Data\OleDb\OleDbDataReader.cs (35)
41private UnsafeNativeMethods.IMultipleResults _imultipleResults; 42private UnsafeNativeMethods.IRowset _irowset; 43private UnsafeNativeMethods.IRow _irow; 107_imultipleResults = (UnsafeNativeMethods.IMultipleResults) result; // maybe null if no results 117_irowset = (UnsafeNativeMethods.IRowset) result; // maybe null if no results 126_irow = (UnsafeNativeMethods.IRow) result; // maybe null if no results 213private UnsafeNativeMethods.IAccessor IAccessor() { 215return (UnsafeNativeMethods.IAccessor) IRowset(); 219private UnsafeNativeMethods.IRowsetInfo IRowsetInfo() { 221return (UnsafeNativeMethods.IRowsetInfo) IRowset(); 224private UnsafeNativeMethods.IRowset IRowset() { 225UnsafeNativeMethods.IRowset irowset = _irowset; 233private UnsafeNativeMethods.IRow IRow() { 234UnsafeNativeMethods.IRow irow = _irow; 425UnsafeNativeMethods.IColumnsInfo icolumnsInfo = (handle as UnsafeNativeMethods.IColumnsInfo); 563UnsafeNativeMethods.IColumnsRowset icolumnsRowset = (handle as UnsafeNativeMethods.IColumnsRowset); 566UnsafeNativeMethods.IRowset rowset = null; 622UnsafeNativeMethods.IMultipleResults multipleResults = _imultipleResults; 721UnsafeNativeMethods.IMultipleResults imultipleResults = _imultipleResults; 730UnsafeNativeMethods.IRowset irowset = _irowset; 746UnsafeNativeMethods.IRow irow = _irow; 868UnsafeNativeMethods.IRowsetInfo rowsetInfo = IRowsetInfo(); 869UnsafeNativeMethods.IRowset result; 1105static internal OleDbException NextResults(UnsafeNativeMethods.IMultipleResults imultipleResults, OleDbConnection connection, OleDbCommand command, out IntPtr recordsAffected) { 1186UnsafeNativeMethods.IMultipleResults imultipleResults = _imultipleResults; 1210_irowset = (UnsafeNativeMethods.IRowset) result; 1341UnsafeNativeMethods.IAccessor iaccessor = IAccessor(); 1545UnsafeNativeMethods.IRowset irowset = IRowset(); 1582UnsafeNativeMethods.IRowset irowset = IRowset(); 1625UnsafeNativeMethods.IRowset irowset = IRowset(); 1654UnsafeNativeMethods.IRowsetInfo irowsetinfo = IRowsetInfo(); 1710UnsafeNativeMethods.IRow irow = IRow(); 2009internal void DumpToSchemaTable(UnsafeNativeMethods.IRowset rowset) {
fx\src\data\System\Data\OleDb\OleDbError.cs (3)
24internal OleDbError(UnsafeNativeMethods.IErrorRecords errorRecords, int index) { 29UnsafeNativeMethods.IErrorInfo errorInfo = errorRecords.GetErrorInfo(index, lcid); 86UnsafeNativeMethods.ISQLErrorInfo sqlErrorInfo;
fx\src\data\System\Data\OleDb\OleDbErrorCollection.cs (3)
20internal OleDbErrorCollection(UnsafeNativeMethods.IErrorInfo errorInfo) { 24UnsafeNativeMethods.IErrorRecords errorRecords = (errorInfo as UnsafeNativeMethods.IErrorRecords);
fx\src\data\System\Data\OleDb\OleDbException.cs (1)
80static internal OleDbException CreateException(UnsafeNativeMethods.IErrorInfo errorInfo, OleDbHResult errorCode, Exception inner) { // MDAC 84364
fx\src\data\System\Data\OleDb\OleDbTransaction.cs (4)
37internal WrappedTransaction(UnsafeNativeMethods.ITransactionLocal transaction, int isolevel, out OleDbHResult hr) : base(transaction) { 188UnsafeNativeMethods.ITransactionLocal wrapper = null; 190wrapper = (UnsafeNativeMethods.ITransactionLocal)_transaction.ComWrapper(); 209internal void BeginInternal(UnsafeNativeMethods.ITransactionLocal transaction) {
fx\src\data\System\Data\OleDb\OleDbWrapper.cs (36)
27private UnsafeNativeMethods.IDataInitializeGetDataSource DangerousIDataInitializeGetDataSource; 35base.handle = Marshal.GetComInterfaceForObject(unknown, typeof(UnsafeNativeMethods.IDataInitialize)); // 42DangerousIDataInitializeGetDataSource = (UnsafeNativeMethods.IDataInitializeGetDataSource)Marshal.GetDelegateForFunctionPointer(method, typeof(UnsafeNativeMethods.IDataInitializeGetDataSource)); 48UnsafeNativeMethods.IDataInitializeGetDataSource GetDataSource = DangerousIDataInitializeGetDataSource; 108UnsafeNativeMethods.IUnknownQueryInterface QueryInterface = constr.DangerousDataSourceIUnknownQueryInterface; 113QueryInterface = (UnsafeNativeMethods.IUnknownQueryInterface)Marshal.GetDelegateForFunctionPointer(method, typeof(UnsafeNativeMethods.IUnknownQueryInterface)); 124UnsafeNativeMethods.IDBInitializeInitialize Initialize = constr.DangerousIDBInitializeInitialize; 129Initialize = (UnsafeNativeMethods.IDBInitializeInitialize)Marshal.GetDelegateForFunctionPointer(method, typeof(UnsafeNativeMethods.IDBInitializeInitialize)); 149UnsafeNativeMethods.IDBCreateSessionCreateSession CreateSession = constr.DangerousIDBCreateSessionCreateSession; 154CreateSession = (UnsafeNativeMethods.IDBCreateSessionCreateSession)Marshal.GetDelegateForFunctionPointer(method, typeof(UnsafeNativeMethods.IDBCreateSessionCreateSession)); 213private UnsafeNativeMethods.IDBCreateCommandCreateCommand DangerousIDBCreateCommandCreateCommand; 244UnsafeNativeMethods.IUnknownQueryInterface QueryInterface = (UnsafeNativeMethods.IUnknownQueryInterface)Marshal.GetDelegateForFunctionPointer(method, typeof(UnsafeNativeMethods.IUnknownQueryInterface)); 251DangerousIDBCreateCommandCreateCommand = (UnsafeNativeMethods.IDBCreateCommandCreateCommand)Marshal.GetDelegateForFunctionPointer(method, typeof(UnsafeNativeMethods.IDBCreateCommandCreateCommand)); 283UnsafeNativeMethods.IDBCreateCommandCreateCommand CreateCommand = constr.DangerousIDBCreateCommandCreateCommand; 288CreateCommand = (UnsafeNativeMethods.IDBCreateCommandCreateCommand)Marshal.GetDelegateForFunctionPointer(method, typeof(UnsafeNativeMethods.IDBCreateCommandCreateCommand)); 299UnsafeNativeMethods.IDBCreateCommandCreateCommand CreateCommand = DangerousIDBCreateCommandCreateCommand; 339private UnsafeNativeMethods.IDBInfo _value; 343_value = (unknown as UnsafeNativeMethods.IDBInfo); 346internal UnsafeNativeMethods.IDBInfo Value { 364private UnsafeNativeMethods.IDBProperties _value; 368_value = (unknown as UnsafeNativeMethods.IDBProperties); 372internal UnsafeNativeMethods.IDBProperties Value { 391private UnsafeNativeMethods.IDBSchemaRowset _value; 395_value = (unknown as UnsafeNativeMethods.IDBSchemaRowset); 398internal UnsafeNativeMethods.IDBSchemaRowset Value { 416private UnsafeNativeMethods.IOpenRowset _value; 420_value = (unknown as UnsafeNativeMethods.IOpenRowset); 424internal UnsafeNativeMethods.IOpenRowset Value {
fx\src\data\System\Data\OleDb\PropertyInfoSet.cs (1)
43internal PropertyInfoSet(UnsafeNativeMethods.IDBProperties idbProperties, PropertyIDSet propIDSet) : base(IntPtr.Zero, true) {
fx\src\data\System\Data\OleDb\RowBinding.cs (5)
31private UnsafeNativeMethods.IAccessor _iaccessor; 98internal OleDbHResult CreateAccessor(UnsafeNativeMethods.IAccessor iaccessor, int flags, ColumnBinding[] bindings) { 290UnsafeNativeMethods.IAccessor iaccessor = _iaccessor; 429UnsafeNativeMethods.IChapteredRowset chapteredRowset = (iaccessor as UnsafeNativeMethods.IChapteredRowset);
fx\src\data\System\Data\OleDb\SafeHandles.cs (4)
32internal DualCoTaskMem(UnsafeNativeMethods.IDBInfo dbInfo, int[] literals, out int literalCount, out IntPtr literalInfo, out OleDbHResult hr) : this() { 42internal DualCoTaskMem(UnsafeNativeMethods.IColumnsInfo columnsInfo, out IntPtr columnCount, out IntPtr columnInfos, out OleDbHResult hr) : this() { 50internal DualCoTaskMem(UnsafeNativeMethods.IDBSchemaRowset dbSchemaRowset, out int schemaCount, out IntPtr schemaGuids, out IntPtr schemaRestrictions, out OleDbHResult hr) : this() { 58internal DualCoTaskMem(UnsafeNativeMethods.IColumnsRowset icolumnsRowset, out IntPtr cOptColumns, out OleDbHResult hr) : base(IntPtr.Zero, true) {
fx\src\data\System\Data\ProviderBase\DbBuffer.cs (1)
77int length = UnsafeNativeMethods.lstrlenW(ptr);
fx\src\data\System\Data\ProviderBase\DbConnectionPoolIdentity.cs (5)
65if ( 0 == UnsafeNativeMethods.CreateWellKnownSid(( int )sidType, null, resultSid, ref length )) { 120if (!UnsafeNativeMethods.CheckTokenMembership(token, NetworkSid, out isNetwork)) { 133if (!UnsafeNativeMethods.GetTokenInformation(token, 1, tokenStruct, bufferLength, ref lengthNeeded)) { 149if (!UnsafeNativeMethods.GetTokenInformation(token, 1, tokenStruct, bufferLength, ref lengthNeeded)) { 163if (!UnsafeNativeMethods.ConvertSidToStringSidW(SID, out sidStringBuffer)) {