diff options
author | Atsushi Eno <atsushieno@gmail.com> | 2015-04-01 17:03:33 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2016-05-03 01:08:08 +0300 |
commit | a807edd81b749582720b4229bffb4217d732ce30 (patch) | |
tree | a37800456d8992e350c05f242145cf00517a1fa6 /mcs/class/referencesource/System.Data | |
parent | 58710c252d6fb6c00a15abf855f80da1293bf596 (diff) |
Fix mobile_static build.
Diffstat (limited to 'mcs/class/referencesource/System.Data')
4 files changed, 9 insertions, 1 deletions
diff --git a/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPool.cs b/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPool.cs index 50ef20b0f8e..a12b68eab34 100644 --- a/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPool.cs +++ b/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPool.cs @@ -1209,10 +1209,12 @@ namespace System.Data.ProviderBase { finally { waitResult = SafeNativeMethods.WaitForMultipleObjectsEx(waitHandleCount, _waitHandles.DangerousGetHandle(), false, waitForMultipleObjectsTimeout, false); +#if !FULL_AOT_RUNTIME // VSTFDEVDIV 479551 - call GetHRForLastWin32Error immediately after after the native call if (waitResult == WAIT_FAILED) { waitForMultipleObjectsExHR = Marshal.GetHRForLastWin32Error(); } +#endif } // From the WaitAny docs: "If more than one object became signaled during @@ -1333,7 +1335,9 @@ namespace System.Data.ProviderBase { if (CREATION_HANDLE == waitResult) { int result = SafeNativeMethods.ReleaseSemaphore(_waitHandles.CreationHandle.DangerousGetHandle(), 1, IntPtr.Zero); if (0 == result) { // failure case +#if !FULL_AOT_RUNTIME releaseSemaphoreResult = Marshal.GetHRForLastWin32Error(); +#endif } } if (mustRelease) { diff --git a/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPoolIdentity.cs b/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPoolIdentity.cs index 330b89fba3a..846ff67f2c2 100644 --- a/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPoolIdentity.cs +++ b/mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPoolIdentity.cs @@ -198,12 +198,14 @@ namespace System.Data.ProviderBase { } static private void IntegratedSecurityError(int caller) { +#if !FULL_AOT_RUNTIME // passing 1,2,3,4,5 instead of true/false so that with a debugger // we could determine more easily which Win32 method call failed int lastError = Marshal.GetHRForLastWin32Error(); if ((Win32_CheckTokenMembership != caller) || (E_NotImpersonationToken != lastError)) { Marshal.ThrowExceptionForHR(lastError); // will only throw if (hresult < 0) } +#endif } } diff --git a/mcs/class/referencesource/System.Data/System/Data/ProviderBase/WrappedIUnknown.cs b/mcs/class/referencesource/System.Data/System/Data/ProviderBase/WrappedIUnknown.cs index 298ed609186..c1501a0d289 100644 --- a/mcs/class/referencesource/System.Data/System/Data/ProviderBase/WrappedIUnknown.cs +++ b/mcs/class/referencesource/System.Data/System/Data/ProviderBase/WrappedIUnknown.cs @@ -32,7 +32,9 @@ namespace System.Data.ProviderBase { if (null != unknown) { RuntimeHelpers.PrepareConstrainedRegions(); try {} finally { +#if !FULL_AOT_RUNTIME base.handle = Marshal.GetIUnknownForObject(unknown); // +#endif } } } diff --git a/mcs/class/referencesource/System.Data/bid/inc/cs/bidPrivateBase.cs b/mcs/class/referencesource/System.Data/bid/inc/cs/bidPrivateBase.cs index b064cdbff13..a2bf64dd498 100644 --- a/mcs/class/referencesource/System.Data/bid/inc/cs/bidPrivateBase.cs +++ b/mcs/class/referencesource/System.Data/bid/inc/cs/bidPrivateBase.cs @@ -892,12 +892,12 @@ internal static partial class Bid modID = NoData; string friendlyName = getAppDomainFriendlyName(); +#if !MONO BIDEXTINFO extInfo = new BIDEXTINFO(Marshal.GetHINSTANCE(mod), getModulePath(mod), friendlyName, hCookie.AddrOfPinnedObject()); -#if !MONO NativeMethods.DllBidEntryPoint( ref modID, BidVer, modIdentity, configFlags, ref modFlags, ctrlCallback, ref extInfo, IntPtr.Zero, IntPtr.Zero ); |