|
// <auto-generated/>
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLAllocHandle(global::System.Data.Odbc.ODBC32.SQL_HANDLE HandleType, nint InputHandle, out nint OutputHandle)
{
OutputHandle = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (nint* __OutputHandle_native = &OutputHandle)
{
__retVal = __PInvoke(HandleType, InputHandle, __OutputHandle_native);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLAllocHandle", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(global::System.Data.Odbc.ODBC32.SQL_HANDLE __HandleType_native, nint __InputHandle_native, nint* __OutputHandle_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLAllocHandle(global::System.Data.Odbc.ODBC32.SQL_HANDLE HandleType, global::System.Data.Odbc.OdbcHandle InputHandle, out nint OutputHandle)
{
OutputHandle = default;
nint __InputHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcHandle>.ManagedToUnmanagedIn __InputHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__InputHandle_native__marshaller.FromManaged(InputHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (nint* __OutputHandle_native = &OutputHandle)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__InputHandle_native = __InputHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(HandleType, __InputHandle_native, __OutputHandle_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__InputHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLAllocHandle", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(global::System.Data.Odbc.ODBC32.SQL_HANDLE __HandleType_native, nint __InputHandle_native, nint* __OutputHandle_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLBindCol(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, ushort ColumnNumber, global::System.Data.Odbc.ODBC32.SQL_C TargetType, global::System.Runtime.InteropServices.HandleRef TargetValue, nint BufferLength, nint StrLen_or_Ind)
{
nint __StatementHandle_native = default;
nint __TargetValue_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.HandleRefMarshaller.KeepAliveMarshaller __TargetValue_native__marshaller = new();
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__TargetValue_native__marshaller.FromManaged(TargetValue);
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__TargetValue_native = __TargetValue_native__marshaller.ToUnmanaged();
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, ColumnNumber, TargetType, __TargetValue_native, BufferLength, StrLen_or_Ind);
}
// NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
__TargetValue_native__marshaller.OnInvoked();
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__TargetValue_native__marshaller.Free();
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLBindCol", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, ushort __ColumnNumber_native, global::System.Data.Odbc.ODBC32.SQL_C __TargetType_native, nint __TargetValue_native, nint __BufferLength_native, nint __StrLen_or_Ind_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLBindCol(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, ushort ColumnNumber, global::System.Data.Odbc.ODBC32.SQL_C TargetType, nint TargetValue, nint BufferLength, nint StrLen_or_Ind)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, ColumnNumber, TargetType, TargetValue, BufferLength, StrLen_or_Ind);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLBindCol", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, ushort __ColumnNumber_native, global::System.Data.Odbc.ODBC32.SQL_C __TargetType_native, nint __TargetValue_native, nint __BufferLength_native, nint __StrLen_or_Ind_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLBindParameter(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, ushort ParameterNumber, short ParamDirection, global::System.Data.Odbc.ODBC32.SQL_C SQLCType, short SQLType, nint cbColDef, nint ibScale, global::System.Runtime.InteropServices.HandleRef rgbValue, nint BufferLength, global::System.Runtime.InteropServices.HandleRef StrLen_or_Ind)
{
nint __StatementHandle_native = default;
nint __rgbValue_native = default;
nint __StrLen_or_Ind_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.HandleRefMarshaller.KeepAliveMarshaller __StrLen_or_Ind_native__marshaller = new();
global::System.Runtime.InteropServices.Marshalling.HandleRefMarshaller.KeepAliveMarshaller __rgbValue_native__marshaller = new();
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StrLen_or_Ind_native__marshaller.FromManaged(StrLen_or_Ind);
__rgbValue_native__marshaller.FromManaged(rgbValue);
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StrLen_or_Ind_native = __StrLen_or_Ind_native__marshaller.ToUnmanaged();
__rgbValue_native = __rgbValue_native__marshaller.ToUnmanaged();
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, ParameterNumber, ParamDirection, SQLCType, SQLType, cbColDef, ibScale, __rgbValue_native, BufferLength, __StrLen_or_Ind_native);
}
// NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
__StrLen_or_Ind_native__marshaller.OnInvoked();
__rgbValue_native__marshaller.OnInvoked();
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StrLen_or_Ind_native__marshaller.Free();
__rgbValue_native__marshaller.Free();
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLBindParameter", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, ushort __ParameterNumber_native, short __ParamDirection_native, global::System.Data.Odbc.ODBC32.SQL_C __SQLCType_native, short __SQLType_native, nint __cbColDef_native, nint __ibScale_native, nint __rgbValue_native, nint __BufferLength_native, nint __StrLen_or_Ind_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLCancel(global::System.Data.Odbc.OdbcStatementHandle StatementHandle)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLCancel", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLCloseCursor(global::System.Data.Odbc.OdbcStatementHandle StatementHandle)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLCloseCursor", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLColAttributeW(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, short ColumnNumber, short FieldIdentifier, global::System.Data.Odbc.CNativeBuffer CharacterAttribute, short BufferLength, out short StringLength, out nint NumericAttribute)
{
StringLength = default;
NumericAttribute = default;
nint __StatementHandle_native = default;
nint __CharacterAttribute_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.CNativeBuffer>.ManagedToUnmanagedIn __CharacterAttribute_native__marshaller = new();
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__CharacterAttribute_native__marshaller.FromManaged(CharacterAttribute);
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (nint* __NumericAttribute_native = &NumericAttribute)
fixed (short* __StringLength_native = &StringLength)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__CharacterAttribute_native = __CharacterAttribute_native__marshaller.ToUnmanaged();
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, ColumnNumber, FieldIdentifier, __CharacterAttribute_native, BufferLength, __StringLength_native, __NumericAttribute_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__CharacterAttribute_native__marshaller.Free();
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLColAttributeW", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, short __ColumnNumber_native, short __FieldIdentifier_native, nint __CharacterAttribute_native, short __BufferLength_native, short* __StringLength_native, nint* __NumericAttribute_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLColumnsW(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, string CatalogName, short NameLen1, string SchemaName, short NameLen2, string TableName, short NameLen3, string ColumnName, short NameLen4)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __ColumnName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(ColumnName))
fixed (void* __TableName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(TableName))
fixed (void* __SchemaName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(SchemaName))
fixed (void* __CatalogName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(CatalogName))
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, (ushort*)__CatalogName_native, NameLen1, (ushort*)__SchemaName_native, NameLen2, (ushort*)__TableName_native, NameLen3, (ushort*)__ColumnName_native, NameLen4);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLColumnsW", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, ushort* __CatalogName_native, short __NameLen1_native, ushort* __SchemaName_native, short __NameLen2_native, ushort* __TableName_native, short __NameLen3_native, ushort* __ColumnName_native, short __NameLen4_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLDisconnect", ExactSpelling = true)]
internal static extern partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLDisconnect(nint ConnectionHandle);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLDriverConnectW(global::System.Data.Odbc.OdbcConnectionHandle hdbc, nint hwnd, string connectionstring, short cbConnectionstring, nint connectionstringout, short cbConnectionstringoutMax, out short cbConnectionstringout, short fDriverCompletion)
{
cbConnectionstringout = default;
nint __hdbc_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcConnectionHandle>.ManagedToUnmanagedIn __hdbc_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__hdbc_native__marshaller.FromManaged(hdbc);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (short* __cbConnectionstringout_native = &cbConnectionstringout)
fixed (void* __connectionstring_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(connectionstring))
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__hdbc_native = __hdbc_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__hdbc_native, hwnd, (ushort*)__connectionstring_native, cbConnectionstring, connectionstringout, cbConnectionstringoutMax, __cbConnectionstringout_native, fDriverCompletion);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__hdbc_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLDriverConnectW", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __hdbc_native, nint __hwnd_native, ushort* __connectionstring_native, short __cbConnectionstring_native, nint __connectionstringout_native, short __cbConnectionstringoutMax_native, short* __cbConnectionstringout_native, short __fDriverCompletion_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLEndTran", ExactSpelling = true)]
internal static extern partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLEndTran(global::System.Data.Odbc.ODBC32.SQL_HANDLE HandleType, nint Handle, short CompletionType);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLExecDirectW(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, string StatementText, int TextLength)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __StatementText_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(StatementText))
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, (ushort*)__StatementText_native, TextLength);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLExecDirectW", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, ushort* __StatementText_native, int __TextLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLExecute(global::System.Data.Odbc.OdbcStatementHandle StatementHandle)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLExecute", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLFetch(global::System.Data.Odbc.OdbcStatementHandle StatementHandle)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLFetch", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLFreeHandle", ExactSpelling = true)]
internal static extern partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLFreeHandle(global::System.Data.Odbc.ODBC32.SQL_HANDLE HandleType, nint StatementHandle);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLFreeStmt(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, global::System.Data.Odbc.ODBC32.STMT Option)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, Option);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLFreeStmt", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, global::System.Data.Odbc.ODBC32.STMT __Option_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLGetConnectAttrW(global::System.Data.Odbc.OdbcConnectionHandle ConnectionHandle, global::System.Data.Odbc.ODBC32.SQL_ATTR Attribute, byte[] Value, int BufferLength, out int StringLength)
{
StringLength = default;
nint __ConnectionHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcConnectionHandle>.ManagedToUnmanagedIn __ConnectionHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__ConnectionHandle_native__marshaller.FromManaged(ConnectionHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (int* __StringLength_native = &StringLength)
fixed (void* __Value_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(Value))
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__ConnectionHandle_native = __ConnectionHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__ConnectionHandle_native, Attribute, (byte*)__Value_native, BufferLength, __StringLength_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__ConnectionHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLGetConnectAttrW", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __ConnectionHandle_native, global::System.Data.Odbc.ODBC32.SQL_ATTR __Attribute_native, byte* __Value_native, int __BufferLength_native, int* __StringLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLGetData(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, ushort ColumnNumber, global::System.Data.Odbc.ODBC32.SQL_C TargetType, global::System.Data.Odbc.CNativeBuffer TargetValue, nint BufferLength, out nint StrLen_or_Ind)
{
StrLen_or_Ind = default;
nint __StatementHandle_native = default;
nint __TargetValue_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.CNativeBuffer>.ManagedToUnmanagedIn __TargetValue_native__marshaller = new();
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__TargetValue_native__marshaller.FromManaged(TargetValue);
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (nint* __StrLen_or_Ind_native = &StrLen_or_Ind)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__TargetValue_native = __TargetValue_native__marshaller.ToUnmanaged();
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, ColumnNumber, TargetType, __TargetValue_native, BufferLength, __StrLen_or_Ind_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__TargetValue_native__marshaller.Free();
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLGetData", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, ushort __ColumnNumber_native, global::System.Data.Odbc.ODBC32.SQL_C __TargetType_native, nint __TargetValue_native, nint __BufferLength_native, nint* __StrLen_or_Ind_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLGetDescFieldW(global::System.Data.Odbc.OdbcDescriptorHandle StatementHandle, short RecNumber, global::System.Data.Odbc.ODBC32.SQL_DESC FieldIdentifier, global::System.Data.Odbc.CNativeBuffer ValuePointer, int BufferLength, out int StringLength)
{
StringLength = default;
nint __StatementHandle_native = default;
nint __ValuePointer_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.CNativeBuffer>.ManagedToUnmanagedIn __ValuePointer_native__marshaller = new();
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcDescriptorHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__ValuePointer_native__marshaller.FromManaged(ValuePointer);
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (int* __StringLength_native = &StringLength)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__ValuePointer_native = __ValuePointer_native__marshaller.ToUnmanaged();
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, RecNumber, FieldIdentifier, __ValuePointer_native, BufferLength, __StringLength_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__ValuePointer_native__marshaller.Free();
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLGetDescFieldW", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, short __RecNumber_native, global::System.Data.Odbc.ODBC32.SQL_DESC __FieldIdentifier_native, nint __ValuePointer_native, int __BufferLength_native, int* __StringLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLGetDiagRecW(global::System.Data.Odbc.ODBC32.SQL_HANDLE HandleType, global::System.Data.Odbc.OdbcHandle Handle, short RecNumber, char[] rchState, out int NativeError, char[] MessageText, short BufferLength, out short TextLength)
{
NativeError = default;
TextLength = default;
nint __Handle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcHandle>.ManagedToUnmanagedIn __Handle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__Handle_native__marshaller.FromManaged(Handle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (short* __TextLength_native = &TextLength)
fixed (void* __MessageText_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<char, char>.ManagedToUnmanagedIn.GetPinnableReference(MessageText))
fixed (int* __NativeError_native = &NativeError)
fixed (void* __rchState_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<char, char>.ManagedToUnmanagedIn.GetPinnableReference(rchState))
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__Handle_native = __Handle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(HandleType, __Handle_native, RecNumber, (char*)__rchState_native, __NativeError_native, (char*)__MessageText_native, BufferLength, __TextLength_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__Handle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLGetDiagRecW", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(global::System.Data.Odbc.ODBC32.SQL_HANDLE __HandleType_native, nint __Handle_native, short __RecNumber_native, char* __rchState_native, int* __NativeError_native, char* __MessageText_native, short __BufferLength_native, short* __TextLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLGetDiagFieldW(global::System.Data.Odbc.ODBC32.SQL_HANDLE HandleType, global::System.Data.Odbc.OdbcHandle Handle, short RecNumber, short DiagIdentifier, char[] rchState, short BufferLength, out short StringLength)
{
StringLength = default;
nint __Handle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcHandle>.ManagedToUnmanagedIn __Handle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__Handle_native__marshaller.FromManaged(Handle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (short* __StringLength_native = &StringLength)
fixed (void* __rchState_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<char, char>.ManagedToUnmanagedIn.GetPinnableReference(rchState))
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__Handle_native = __Handle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(HandleType, __Handle_native, RecNumber, DiagIdentifier, (char*)__rchState_native, BufferLength, __StringLength_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__Handle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLGetDiagFieldW", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(global::System.Data.Odbc.ODBC32.SQL_HANDLE __HandleType_native, nint __Handle_native, short __RecNumber_native, short __DiagIdentifier_native, char* __rchState_native, short __BufferLength_native, short* __StringLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLGetFunctions(global::System.Data.Odbc.OdbcConnectionHandle hdbc, global::System.Data.Odbc.ODBC32.SQL_API fFunction, out short pfExists)
{
pfExists = default;
nint __hdbc_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcConnectionHandle>.ManagedToUnmanagedIn __hdbc_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__hdbc_native__marshaller.FromManaged(hdbc);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (short* __pfExists_native = &pfExists)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__hdbc_native = __hdbc_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__hdbc_native, fFunction, __pfExists_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__hdbc_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLGetFunctions", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __hdbc_native, global::System.Data.Odbc.ODBC32.SQL_API __fFunction_native, short* __pfExists_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLGetInfoW(global::System.Data.Odbc.OdbcConnectionHandle hdbc, global::System.Data.Odbc.ODBC32.SQL_INFO fInfoType, byte[] rgbInfoValue, short cbInfoValueMax, out short pcbInfoValue)
{
pcbInfoValue = default;
nint __hdbc_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcConnectionHandle>.ManagedToUnmanagedIn __hdbc_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__hdbc_native__marshaller.FromManaged(hdbc);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (short* __pcbInfoValue_native = &pcbInfoValue)
fixed (void* __rgbInfoValue_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(rgbInfoValue))
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__hdbc_native = __hdbc_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__hdbc_native, fInfoType, (byte*)__rgbInfoValue_native, cbInfoValueMax, __pcbInfoValue_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__hdbc_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLGetInfoW", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __hdbc_native, global::System.Data.Odbc.ODBC32.SQL_INFO __fInfoType_native, byte* __rgbInfoValue_native, short __cbInfoValueMax_native, short* __pcbInfoValue_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLGetInfoW(global::System.Data.Odbc.OdbcConnectionHandle hdbc, global::System.Data.Odbc.ODBC32.SQL_INFO fInfoType, byte[] rgbInfoValue, short cbInfoValueMax, nint pcbInfoValue)
{
nint __hdbc_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcConnectionHandle>.ManagedToUnmanagedIn __hdbc_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__hdbc_native__marshaller.FromManaged(hdbc);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __rgbInfoValue_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(rgbInfoValue))
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__hdbc_native = __hdbc_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__hdbc_native, fInfoType, (byte*)__rgbInfoValue_native, cbInfoValueMax, pcbInfoValue);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__hdbc_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLGetInfoW", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __hdbc_native, global::System.Data.Odbc.ODBC32.SQL_INFO __fInfoType_native, byte* __rgbInfoValue_native, short __cbInfoValueMax_native, nint __pcbInfoValue_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLGetStmtAttrW(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, global::System.Data.Odbc.ODBC32.SQL_ATTR Attribute, out nint Value, int BufferLength, out int StringLength)
{
Value = default;
StringLength = default;
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (int* __StringLength_native = &StringLength)
fixed (nint* __Value_native = &Value)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, Attribute, __Value_native, BufferLength, __StringLength_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLGetStmtAttrW", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, global::System.Data.Odbc.ODBC32.SQL_ATTR __Attribute_native, nint* __Value_native, int __BufferLength_native, int* __StringLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLGetTypeInfo(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, short fSqlType)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, fSqlType);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLGetTypeInfo", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, short __fSqlType_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLMoreResults(global::System.Data.Odbc.OdbcStatementHandle StatementHandle)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLMoreResults", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLNumResultCols(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, out short ColumnCount)
{
ColumnCount = default;
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (short* __ColumnCount_native = &ColumnCount)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, __ColumnCount_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLNumResultCols", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, short* __ColumnCount_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLPrepareW(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, string StatementText, int TextLength)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __StatementText_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(StatementText))
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, (ushort*)__StatementText_native, TextLength);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLPrepareW", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, ushort* __StatementText_native, int __TextLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLPrimaryKeysW(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, string CatalogName, short NameLen1, string SchemaName, short NameLen2, string TableName, short NameLen3)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __TableName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(TableName))
fixed (void* __SchemaName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(SchemaName))
fixed (void* __CatalogName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(CatalogName))
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, (ushort*)__CatalogName_native, NameLen1, (ushort*)__SchemaName_native, NameLen2, (ushort*)__TableName_native, NameLen3);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLPrimaryKeysW", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, ushort* __CatalogName_native, short __NameLen1_native, ushort* __SchemaName_native, short __NameLen2_native, ushort* __TableName_native, short __NameLen3_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLProcedureColumnsW(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, string CatalogName, short NameLen1, string SchemaName, short NameLen2, string ProcName, short NameLen3, string ColumnName, short NameLen4)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __ColumnName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(ColumnName))
fixed (void* __ProcName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(ProcName))
fixed (void* __SchemaName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(SchemaName))
fixed (void* __CatalogName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(CatalogName))
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, (ushort*)__CatalogName_native, NameLen1, (ushort*)__SchemaName_native, NameLen2, (ushort*)__ProcName_native, NameLen3, (ushort*)__ColumnName_native, NameLen4);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLProcedureColumnsW", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, ushort* __CatalogName_native, short __NameLen1_native, ushort* __SchemaName_native, short __NameLen2_native, ushort* __ProcName_native, short __NameLen3_native, ushort* __ColumnName_native, short __NameLen4_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLProceduresW(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, string CatalogName, short NameLen1, string SchemaName, short NameLen2, string ProcName, short NameLen3)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __ProcName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(ProcName))
fixed (void* __SchemaName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(SchemaName))
fixed (void* __CatalogName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(CatalogName))
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, (ushort*)__CatalogName_native, NameLen1, (ushort*)__SchemaName_native, NameLen2, (ushort*)__ProcName_native, NameLen3);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLProceduresW", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, ushort* __CatalogName_native, short __NameLen1_native, ushort* __SchemaName_native, short __NameLen2_native, ushort* __ProcName_native, short __NameLen3_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLRowCount(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, out nint RowCount)
{
RowCount = default;
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (nint* __RowCount_native = &RowCount)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, __RowCount_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLRowCount", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, nint* __RowCount_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLSetConnectAttrW(global::System.Data.Odbc.OdbcConnectionHandle ConnectionHandle, global::System.Data.Odbc.ODBC32.SQL_ATTR Attribute, string Value, int StringLength)
{
nint __ConnectionHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcConnectionHandle>.ManagedToUnmanagedIn __ConnectionHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__ConnectionHandle_native__marshaller.FromManaged(ConnectionHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __Value_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(Value))
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__ConnectionHandle_native = __ConnectionHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__ConnectionHandle_native, Attribute, (ushort*)__Value_native, StringLength);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__ConnectionHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLSetConnectAttrW", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __ConnectionHandle_native, global::System.Data.Odbc.ODBC32.SQL_ATTR __Attribute_native, ushort* __Value_native, int __StringLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLSetConnectAttrW(global::System.Data.Odbc.OdbcConnectionHandle ConnectionHandle, global::System.Data.Odbc.ODBC32.SQL_ATTR Attribute, nint Value, int StringLength)
{
nint __ConnectionHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcConnectionHandle>.ManagedToUnmanagedIn __ConnectionHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__ConnectionHandle_native__marshaller.FromManaged(ConnectionHandle);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__ConnectionHandle_native = __ConnectionHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__ConnectionHandle_native, Attribute, Value, StringLength);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__ConnectionHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLSetConnectAttrW", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __ConnectionHandle_native, global::System.Data.Odbc.ODBC32.SQL_ATTR __Attribute_native, nint __Value_native, int __StringLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLSetConnectAttrW", ExactSpelling = true)]
internal static extern partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLSetConnectAttrW(nint ConnectionHandle, global::System.Data.Odbc.ODBC32.SQL_ATTR Attribute, nint Value, int StringLength);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLSetDescFieldW(global::System.Data.Odbc.OdbcDescriptorHandle StatementHandle, short ColumnNumber, global::System.Data.Odbc.ODBC32.SQL_DESC FieldIdentifier, global::System.Runtime.InteropServices.HandleRef CharacterAttribute, int BufferLength)
{
nint __StatementHandle_native = default;
nint __CharacterAttribute_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.HandleRefMarshaller.KeepAliveMarshaller __CharacterAttribute_native__marshaller = new();
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcDescriptorHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__CharacterAttribute_native__marshaller.FromManaged(CharacterAttribute);
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__CharacterAttribute_native = __CharacterAttribute_native__marshaller.ToUnmanaged();
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, ColumnNumber, FieldIdentifier, __CharacterAttribute_native, BufferLength);
}
// NotifyForSuccessfulInvoke - Keep alive any managed objects that need to stay alive across the call.
__CharacterAttribute_native__marshaller.OnInvoked();
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__CharacterAttribute_native__marshaller.Free();
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLSetDescFieldW", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, short __ColumnNumber_native, global::System.Data.Odbc.ODBC32.SQL_DESC __FieldIdentifier_native, nint __CharacterAttribute_native, int __BufferLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLSetDescFieldW(global::System.Data.Odbc.OdbcDescriptorHandle StatementHandle, short ColumnNumber, global::System.Data.Odbc.ODBC32.SQL_DESC FieldIdentifier, nint CharacterAttribute, int BufferLength)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcDescriptorHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, ColumnNumber, FieldIdentifier, CharacterAttribute, BufferLength);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLSetDescFieldW", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, short __ColumnNumber_native, global::System.Data.Odbc.ODBC32.SQL_DESC __FieldIdentifier_native, nint __CharacterAttribute_native, int __BufferLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLSetEnvAttr(global::System.Data.Odbc.OdbcEnvironmentHandle EnvironmentHandle, global::System.Data.Odbc.ODBC32.SQL_ATTR Attribute, nint Value, global::System.Data.Odbc.ODBC32.SQL_IS StringLength)
{
nint __EnvironmentHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcEnvironmentHandle>.ManagedToUnmanagedIn __EnvironmentHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__EnvironmentHandle_native__marshaller.FromManaged(EnvironmentHandle);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__EnvironmentHandle_native = __EnvironmentHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__EnvironmentHandle_native, Attribute, Value, StringLength);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__EnvironmentHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLSetEnvAttr", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __EnvironmentHandle_native, global::System.Data.Odbc.ODBC32.SQL_ATTR __Attribute_native, nint __Value_native, global::System.Data.Odbc.ODBC32.SQL_IS __StringLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLSetStmtAttrW(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, int Attribute, nint Value, int StringLength)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, Attribute, Value, StringLength);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLSetStmtAttrW", ExactSpelling = true)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, int __Attribute_native, nint __Value_native, int __StringLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLSpecialColumnsW(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, global::System.Data.Odbc.ODBC32.SQL_SPECIALCOLS IdentifierType, string CatalogName, short NameLen1, string SchemaName, short NameLen2, string TableName, short NameLen3, global::System.Data.Odbc.ODBC32.SQL_SCOPE Scope, global::System.Data.Odbc.ODBC32.SQL_NULLABILITY Nullable)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __TableName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(TableName))
fixed (void* __SchemaName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(SchemaName))
fixed (void* __CatalogName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(CatalogName))
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, IdentifierType, (ushort*)__CatalogName_native, NameLen1, (ushort*)__SchemaName_native, NameLen2, (ushort*)__TableName_native, NameLen3, Scope, Nullable);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLSpecialColumnsW", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, global::System.Data.Odbc.ODBC32.SQL_SPECIALCOLS __IdentifierType_native, ushort* __CatalogName_native, short __NameLen1_native, ushort* __SchemaName_native, short __NameLen2_native, ushort* __TableName_native, short __NameLen3_native, global::System.Data.Odbc.ODBC32.SQL_SCOPE __Scope_native, global::System.Data.Odbc.ODBC32.SQL_NULLABILITY __Nullable_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLStatisticsW(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, string CatalogName, short NameLen1, string SchemaName, short NameLen2, nint TableName, short NameLen3, short Unique, short Reserved)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __SchemaName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(SchemaName))
fixed (void* __CatalogName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(CatalogName))
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, (ushort*)__CatalogName_native, NameLen1, (ushort*)__SchemaName_native, NameLen2, TableName, NameLen3, Unique, Reserved);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLStatisticsW", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, ushort* __CatalogName_native, short __NameLen1_native, ushort* __SchemaName_native, short __NameLen2_native, nint __TableName_native, short __NameLen3_native, short __Unique_native, short __Reserved_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Odbc
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
[global::System.Runtime.CompilerServices.SkipLocalsInitAttribute]
internal static partial global::System.Data.Odbc.ODBC32.SQLRETURN SQLTablesW(global::System.Data.Odbc.OdbcStatementHandle StatementHandle, string CatalogName, short NameLen1, string SchemaName, short NameLen2, string TableName, short NameLen3, string TableType, short NameLen4)
{
nint __StatementHandle_native = default;
global::System.Data.Odbc.ODBC32.SQLRETURN __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Data.Odbc.OdbcStatementHandle>.ManagedToUnmanagedIn __StatementHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__StatementHandle_native__marshaller.FromManaged(StatementHandle);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __TableType_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(TableType))
fixed (void* __TableName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(TableName))
fixed (void* __SchemaName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(SchemaName))
fixed (void* __CatalogName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(CatalogName))
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__StatementHandle_native = __StatementHandle_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__StatementHandle_native, (ushort*)__CatalogName_native, NameLen1, (ushort*)__SchemaName_native, NameLen2, (ushort*)__TableName_native, NameLen3, (ushort*)__TableType_native, NameLen4);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__StatementHandle_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libodbc", EntryPoint = "SQLTablesW", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe global::System.Data.Odbc.ODBC32.SQLRETURN __PInvoke(nint __StatementHandle_native, ushort* __CatalogName_native, short __NameLen1_native, ushort* __SchemaName_native, short __NameLen2_native, ushort* __TableName_native, short __NameLen3_native, ushort* __TableType_native, short __NameLen4_native);
}
}
}
|