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