69 references to SafeNativeMethods
System.Data (69)
fx\src\data\System\Data\Common\AdapterUtil.cs (2)
2084if (0 == SafeNativeMethods.GetComputerNameEx(ComputerNameDnsFullyQualified, null, ref length)) { 2093if (0 == SafeNativeMethods.GetComputerNameEx(ComputerNameDnsFullyQualified, buffer, ref length)) {
fx\src\data\System\Data\Common\SafeNativeMethods.cs (1)
148SafeNativeMethods.SetErrorInfo(0, ADP.PtrZero);
fx\src\data\System\Data\OleDb\DBPropSet.cs (7)
39base.handle = SafeNativeMethods.CoTaskMemAlloc(countOfBytes); 41SafeNativeMethods.ZeroMemory(base.handle, countOfBytes); 134SafeNativeMethods.VariantClear(vptr); 136SafeNativeMethods.CoTaskMemFree(rgProperties); 139SafeNativeMethods.CoTaskMemFree(ptr); 216propset.rgProperties = SafeNativeMethods.CoTaskMemAlloc(countOfBytes); 220SafeNativeMethods.ZeroMemory(propset.rgProperties, countOfBytes);
fx\src\data\System\Data\OleDb\OleDbCommand.cs (5)
785SafeNativeMethods.Wrapper.ClearErrorInfo(); 818SafeNativeMethods.Wrapper.ClearErrorInfo(); 826SafeNativeMethods.Wrapper.ClearErrorInfo(); 1169SafeNativeMethods.Wrapper.ClearErrorInfo(); 1214SafeNativeMethods.Wrapper.ClearErrorInfo();
fx\src\data\System\Data\OleDb\OleDbConnection.cs (2)
564SafeNativeMethods.Wrapper.ClearErrorInfo(); 580SafeNativeMethods.Wrapper.ClearErrorInfo();
fx\src\data\System\Data\OleDb\OleDbConnectionInternal.cs (4)
234SafeNativeMethods.Wrapper.ClearErrorInfo(); 357SafeNativeMethods.Wrapper.ClearErrorInfo(); 419SafeNativeMethods.Wrapper.ClearErrorInfo(); 520SafeNativeMethods.Wrapper.ClearErrorInfo();
fx\src\data\System\Data\OleDb\OleDbDataReader.cs (3)
1148SafeNativeMethods.Wrapper.ClearErrorInfo(); 1634SafeNativeMethods.Wrapper.ClearErrorInfo(); 1662SafeNativeMethods.Wrapper.ClearErrorInfo();
fx\src\data\System\Data\OleDb\OleDbError.cs (2)
41lcid = SafeNativeMethods.GetUserDefaultLCID(); 66lcid = SafeNativeMethods.GetUserDefaultLCID();
fx\src\data\System\Data\OleDb\OleDbTransaction.cs (2)
316SafeNativeMethods.Wrapper.ClearErrorInfo(); 330SafeNativeMethods.Wrapper.ClearErrorInfo();
fx\src\data\System\Data\OleDb\OleDbWrapper.cs (1)
76SafeNativeMethods.Wrapper.ClearErrorInfo();
fx\src\data\System\Data\OleDb\PropertyInfoSet.cs (5)
53SafeNativeMethods.Wrapper.ClearErrorInfo(); 125SafeNativeMethods.VariantClear(valuePtr); 127SafeNativeMethods.CoTaskMemFree(infoPtr); // was allocated by provider 130SafeNativeMethods.CoTaskMemFree(ptr); 136SafeNativeMethods.CoTaskMemFree(ptr);
fx\src\data\System\Data\OleDb\RowBinding.cs (13)
238ptr = SafeNativeMethods.SysAllocStringLen(value, value.Length); 301SafeNativeMethods.Wrapper.ClearErrorInfo(); 430IntPtr chapter = SafeNativeMethods.InterlockedExchangePointer(ADP.IntPtrOffset(buffer, valueOffset), ADP.PtrZero); 451SafeNativeMethods.SysFreeString(currentValue); 454SafeNativeMethods.SysFreeString(originalValue); 476SafeNativeMethods.CoTaskMemFree(currentValue); 500SafeNativeMethods.VariantClear(currentHandle); 503SafeNativeMethods.VariantClear(originalHandle); 507SafeNativeMethods.ZeroMemory(originalHandle, (IntPtr)ODB.SizeOf_Variant); 526SafeNativeMethods.PropVariantClear(currentHandle); 529SafeNativeMethods.PropVariantClear(originalHandle); 533SafeNativeMethods.ZeroMemory(originalHandle, (IntPtr)NativeOledbWrapper.SizeOfPROPVARIANT); 550value = SafeNativeMethods.InterlockedExchangePointer(ptr, IntPtr.Zero);
fx\src\data\System\Data\OleDb\SafeHandles.cs (2)
77SafeNativeMethods.CoTaskMemFree(ptr); 83SafeNativeMethods.CoTaskMemFree(ptr);
fx\src\data\System\Data\ProviderBase\DbBuffer.cs (3)
37base.handle = SafeNativeMethods.LocalAlloc(flags, (IntPtr)initialSize); 337SafeNativeMethods.LocalFree(ptr); 566SafeNativeMethods.ZeroMemory(ptr, (IntPtr)Length);
fx\src\data\System\Data\ProviderBase\DbConnectionPool.cs (4)
1258waitResult = SafeNativeMethods.WaitForMultipleObjectsEx(waitHandleCount, _waitHandles.DangerousGetHandle(), false, waitForMultipleObjectsTimeout, false); 1382int result = SafeNativeMethods.ReleaseSemaphore(_waitHandles.CreationHandle.DangerousGetHandle(), 1, IntPtr.Zero); 1554waitResult = SafeNativeMethods.WaitForSingleObjectEx(_waitHandles.CreationHandle.DangerousGetHandle(), timeout, false); 1600waitResult = SafeNativeMethods.ReleaseSemaphore(_waitHandles.CreationHandle.DangerousGetHandle(), 1, IntPtr.Zero);
fx\src\data\System\Data\ProviderBase\DbConnectionPoolCounters.cs (1)
243int pid = SafeNativeMethods.GetCurrentProcessId();
fx\src\data\System\Data\ProviderBase\DbConnectionPoolIdentity.cs (5)
128tokenStruct = SafeNativeMethods.LocalAlloc(DbBuffer.LMEM_FIXED, (IntPtr)bufferLength); 141SafeNativeMethods.LocalFree(tokenStruct); 143tokenStruct = SafeNativeMethods.LocalAlloc(DbBuffer.LMEM_FIXED, (IntPtr)bufferLength); 184SafeNativeMethods.LocalFree(tokenStruct); 188SafeNativeMethods.LocalFree(sidStringBuffer);
fx\src\data\System\Data\SqlClient\LocalDBAPI.cs (2)
119IntPtr functionAddr = SafeNativeMethods.GetProcAddress(UserInstanceDLLHandle, "LocalDBCreateInstance"); 160IntPtr functionAddr = SafeNativeMethods.GetProcAddress(UserInstanceDLLHandle, "LocalDBFormatMessage");
fx\src\data\System\Data\SqlClient\SqlConnection.cs (1)
1876uint pid = (uint)SafeNativeMethods.GetCurrentProcessId();
fx\src\data\System\Data\SqlClient\SqlUtil.cs (3)
194IntPtr handle = SafeNativeMethods.GetModuleHandle(null); 199if (IntPtr.Zero != SafeNativeMethods.GetProcAddress(handle, "_______SQL______Process______Available@0")) { 202else if (IntPtr.Zero != SafeNativeMethods.GetProcAddress(handle, "______SQL______Process______Available")) {
fx\src\data\System\Data\SqlClient\TdsParserStaticMethods.cs (1)
114return SafeNativeMethods.GetCurrentProcessId();