Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / DataOracleClient / System / Data / OracleClient / SafeNativeMethods.cs / 1 / SafeNativeMethods.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Data.Common { using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; using System.Runtime.ConstrainedExecution; [ System.Security.SuppressUnmanagedCodeSecurityAttribute() ] sealed internal class SafeNativeMethods { private SafeNativeMethods() { } // [DllImport(ExternDll.Kernel32, CharSet=System.Runtime.InteropServices.CharSet.Auto)] static internal extern int GetCurrentProcessId(); [DllImport(ExternDll.Kernel32, SetLastError=true)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] static internal extern int ReleaseSemaphore(IntPtr handle, int releaseCount, IntPtr previousCount); [DllImport(ExternDll.Kernel32, SetLastError=true)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] static internal extern int WaitForMultipleObjectsEx(uint nCount, IntPtr lpHandles, bool bWaitAll, uint dwMilliseconds, bool bAlertable); [DllImport(ExternDll.Kernel32/*, SetLastError=true*/)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] static internal extern int WaitForSingleObjectEx(IntPtr lpHandles, uint dwMilliseconds, bool bAlertable); ////////////////////////////// ///// END OF COMMON CODE STUFF ////////////////////////////// [DllImport(ExternDll.Kernel32, SetLastError=true)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] static internal extern IntPtr LocalAlloc(int flags, IntPtr countOfBytes); [DllImport(ExternDll.Kernel32, SetLastError=true)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] static internal extern IntPtr LocalFree(IntPtr handle); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Data.Common { using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Text; using System.Runtime.ConstrainedExecution; [ System.Security.SuppressUnmanagedCodeSecurityAttribute() ] sealed internal class SafeNativeMethods { private SafeNativeMethods() { } // [DllImport(ExternDll.Kernel32, CharSet=System.Runtime.InteropServices.CharSet.Auto)] static internal extern int GetCurrentProcessId(); [DllImport(ExternDll.Kernel32, SetLastError=true)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] static internal extern int ReleaseSemaphore(IntPtr handle, int releaseCount, IntPtr previousCount); [DllImport(ExternDll.Kernel32, SetLastError=true)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] static internal extern int WaitForMultipleObjectsEx(uint nCount, IntPtr lpHandles, bool bWaitAll, uint dwMilliseconds, bool bAlertable); [DllImport(ExternDll.Kernel32/*, SetLastError=true*/)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] static internal extern int WaitForSingleObjectEx(IntPtr lpHandles, uint dwMilliseconds, bool bAlertable); ////////////////////////////// ///// END OF COMMON CODE STUFF ////////////////////////////// [DllImport(ExternDll.Kernel32, SetLastError=true)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)] static internal extern IntPtr LocalAlloc(int flags, IntPtr countOfBytes); [DllImport(ExternDll.Kernel32, SetLastError=true)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] static internal extern IntPtr LocalFree(IntPtr handle); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ToolStripItemRenderEventArgs.cs
- EditorZoneDesigner.cs
- BitmapEffectState.cs
- GregorianCalendar.cs
- EntityCommand.cs
- LogLogRecord.cs
- FileDialog.cs
- CompilerHelpers.cs
- DurableInstanceProvider.cs
- ArgumentNullException.cs
- TCPClient.cs
- ParentUndoUnit.cs
- ToolstripProfessionalRenderer.cs
- ConstructorArgumentAttribute.cs
- DateTimeConverter.cs
- DataBoundControl.cs
- ProjectedSlot.cs
- ProcessInputEventArgs.cs
- SqlNodeAnnotation.cs
- BuiltInPermissionSets.cs
- XmlSerializationReader.cs
- HwndHostAutomationPeer.cs
- DefaultPrintController.cs
- PeerHopCountAttribute.cs
- XamlToRtfWriter.cs
- StringAnimationUsingKeyFrames.cs
- InvokePattern.cs
- ZipIOBlockManager.cs
- NetMsmqSecurityElement.cs
- PropertyFilterAttribute.cs
- ApplicationSecurityInfo.cs
- Aggregates.cs
- ExpandCollapseIsCheckedConverter.cs
- WizardPanelChangingEventArgs.cs
- ForeignConstraint.cs
- WindowsRichEditRange.cs
- AtlasWeb.Designer.cs
- ComplexPropertyEntry.cs
- wgx_exports.cs
- WebPartDeleteVerb.cs
- TemplateComponentConnector.cs
- designeractionlistschangedeventargs.cs
- ContextItemManager.cs
- RoutedEventConverter.cs
- UserControlCodeDomTreeGenerator.cs
- PageThemeBuildProvider.cs
- HttpResponseHeader.cs
- SafePEFileHandle.cs
- AuthenticationService.cs
- ActivityWithResultValueSerializer.cs
- RadioButton.cs
- ConsoleTraceListener.cs
- mongolianshape.cs
- RuntimeWrappedException.cs
- XsltOutput.cs
- WorkflowRuntimeServiceElement.cs
- ArgIterator.cs
- StateRuntime.cs
- IdentitySection.cs
- PaintEvent.cs
- ParagraphVisual.cs
- ToolStripItemClickedEventArgs.cs
- DoWhile.cs
- MethodToken.cs
- GetWinFXPath.cs
- HttpAsyncResult.cs
- DefaultHttpHandler.cs
- _CacheStreams.cs
- PageWrapper.cs
- TreeViewCancelEvent.cs
- Message.cs
- TypeDelegator.cs
- HelpProvider.cs
- AuthenticationService.cs
- StringToken.cs
- BitmapMetadata.cs
- HtmlMeta.cs
- DrawingVisualDrawingContext.cs
- SafeThreadHandle.cs
- UrlMappingsModule.cs
- BuildResult.cs
- PostBackTrigger.cs
- RestClientProxyHandler.cs
- XmlReflectionMember.cs
- Context.cs
- HttpCapabilitiesSectionHandler.cs
- HtmlInputFile.cs
- WCFServiceClientProxyGenerator.cs
- ObjectItemCollection.cs
- RightsManagementEncryptedStream.cs
- ToolboxItemAttribute.cs
- Permission.cs
- DataRow.cs
- XmlC14NWriter.cs
- RequestDescription.cs
- rsa.cs
- CryptoApi.cs
- tibetanshape.cs
- AssemblyResourceLoader.cs
- EdmMember.cs