Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- SettingsBase.cs
- OptimalTextSource.cs
- GeometryHitTestParameters.cs
- DataObjectPastingEventArgs.cs
- DataGridViewRowPrePaintEventArgs.cs
- DebugView.cs
- UriParserTemplates.cs
- DbProviderServices.cs
- StaticSiteMapProvider.cs
- CatchDesigner.xaml.cs
- AnalyzedTree.cs
- ExpressionBuilderCollection.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- SafeNativeMethods.cs
- DataGrid.cs
- RichTextBoxContextMenu.cs
- AesManaged.cs
- KeyFrames.cs
- CommandField.cs
- UInt32Converter.cs
- MessageHeaderException.cs
- RawKeyboardInputReport.cs
- ModuleBuilderData.cs
- ToolStripItemEventArgs.cs
- UserControlParser.cs
- FtpRequestCacheValidator.cs
- ArrayWithOffset.cs
- DataServiceQuery.cs
- SizeConverter.cs
- Point3D.cs
- coordinatorscratchpad.cs
- DesignerProperties.cs
- FormViewModeEventArgs.cs
- XPathAncestorQuery.cs
- RawTextInputReport.cs
- AnnotationHighlightLayer.cs
- ProcessHostMapPath.cs
- DataObjectMethodAttribute.cs
- Sql8ConformanceChecker.cs
- ValidationPropertyAttribute.cs
- Aggregates.cs
- EventDescriptor.cs
- Input.cs
- Compilation.cs
- UrlMapping.cs
- SessionEndingEventArgs.cs
- HtmlEmptyTagControlBuilder.cs
- ECDsaCng.cs
- TransformerInfo.cs
- BinaryWriter.cs
- GridViewDeleteEventArgs.cs
- ParagraphVisual.cs
- QilTargetType.cs
- DataGridGeneralPage.cs
- RegularExpressionValidator.cs
- PageSettings.cs
- MultiSelectRootGridEntry.cs
- XsdDataContractImporter.cs
- PageContentCollection.cs
- ErrorProvider.cs
- DuplicateWaitObjectException.cs
- x509utils.cs
- Animatable.cs
- PlacementWorkspace.cs
- TypedReference.cs
- SmtpDigestAuthenticationModule.cs
- ClientScriptManager.cs
- TrueReadOnlyCollection.cs
- TextPointer.cs
- WebConfigurationHost.cs
- RelationshipConstraintValidator.cs
- NamespaceInfo.cs
- EditorPart.cs
- DbgUtil.cs
- AutomationPatternInfo.cs
- AtlasWeb.Designer.cs
- NotConverter.cs
- PageParserFilter.cs
- VBCodeProvider.cs
- CrossAppDomainChannel.cs
- TextRangeAdaptor.cs
- TableLayoutColumnStyleCollection.cs
- MissingMethodException.cs
- UTF8Encoding.cs
- SafeReversePInvokeHandle.cs
- ToolboxSnapDragDropEventArgs.cs
- FileLoadException.cs
- ContentPathSegment.cs
- ControlCachePolicy.cs
- ConfigurationElement.cs
- Source.cs
- UpdatableWrapper.cs
- TrackingQuery.cs
- ProgressPage.cs
- QuerySafeNavigator.cs
- Transform3DGroup.cs
- Keyboard.cs
- ConfigurationLoader.cs
- PropertyMappingExceptionEventArgs.cs
- EntityKeyElement.cs