Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Integration / MS / Win32 / UnsafeNativeMethods.cs / 1 / UnsafeNativeMethods.cs
using System; using System.Runtime.ConstrainedExecution; using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; namespace MS.Win32 { internal static class UnsafeNativeMethods { [DllImport(ExternDll.User32, ExactSpelling = true, CharSet = CharSet.Auto)] public static extern bool IsChild(IntPtr hWndParent, IntPtr hwnd); [DllImport(ExternDll.User32, ExactSpelling = true, CharSet = CharSet.Auto)] public static extern IntPtr GetFocus(); [DllImport("User32", ExactSpelling = true, CharSet = CharSet.Auto)] internal static extern IntPtr SetParent(IntPtr hWnd, IntPtr hWndParent); [DllImport(ExternDll.User32, ExactSpelling = true, CharSet = CharSet.Auto)] [return: MarshalAs(UnmanagedType.Bool)] public static extern bool TranslateMessage([In, Out] ref System.Windows.Interop.MSG msg); [DllImport(ExternDll.User32, CharSet = CharSet.Auto)] public static extern IntPtr DispatchMessage([In] ref System.Windows.Interop.MSG msg); [DllImport(ExternDll.User32, CharSet = CharSet.Auto, SetLastError = true)] internal static extern IntPtr SendMessage(HandleRef hWnd, int msg, IntPtr wParam, IntPtr lParam); [DllImport(ExternDll.Gdi32, ExactSpelling = true, CharSet = CharSet.Auto)] public static extern int GetDeviceCaps(DCSafeHandle hDC, int nIndex); [DllImport(ExternDll.Gdi32, EntryPoint = "CreateDC", CharSet = CharSet.Auto)] private static extern DCSafeHandle IntCreateDC(string lpszDriver, string lpszDeviceName, string lpszOutput, IntPtr devMode); public static DCSafeHandle CreateDC(string lpszDriver) { return IntCreateDC(lpszDriver, null, null, IntPtr.Zero); } [DllImport(ExternDll.Gdi32, ExactSpelling = true, CharSet = CharSet.Auto)] [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)] public static extern bool DeleteDC(IntPtr hDC); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FormDocumentDesigner.cs
- ResourceDictionary.cs
- ToolStripPanelRenderEventArgs.cs
- PropertyPathConverter.cs
- NodeFunctions.cs
- XhtmlBasicObjectListAdapter.cs
- SByteConverter.cs
- CodeSnippetTypeMember.cs
- Expressions.cs
- XmlSchemaGroup.cs
- XmlSchemaDocumentation.cs
- OperationFormatStyle.cs
- WebUtil.cs
- NameValueConfigurationCollection.cs
- NativeMethods.cs
- Scene3D.cs
- SelectManyQueryOperator.cs
- ReceiveParametersContent.cs
- SchemaElementLookUpTable.cs
- Win32MouseDevice.cs
- InheritanceRules.cs
- listitem.cs
- DataGridSortingEventArgs.cs
- columnmapkeybuilder.cs
- WorkflowInvoker.cs
- ConvertEvent.cs
- DeferredTextReference.cs
- HTMLTagNameToTypeMapper.cs
- ReaderContextStackData.cs
- ImageInfo.cs
- AlternateViewCollection.cs
- KnownIds.cs
- HandleRef.cs
- KnownTypesHelper.cs
- ItemChangedEventArgs.cs
- safesecurityhelperavalon.cs
- AffineTransform3D.cs
- TargetConverter.cs
- InkCanvasAutomationPeer.cs
- LocalTransaction.cs
- entitydatasourceentitysetnameconverter.cs
- LocalizedNameDescriptionPair.cs
- remotingproxy.cs
- ProcessHostFactoryHelper.cs
- ColorContextHelper.cs
- EdmPropertyAttribute.cs
- DomainConstraint.cs
- MulticastNotSupportedException.cs
- PrinterResolution.cs
- ProfileServiceManager.cs
- PropertyPath.cs
- MarkupObject.cs
- Inline.cs
- IsolatedStorageFilePermission.cs
- CodeValidator.cs
- BulletedList.cs
- ToolStripTextBox.cs
- WebServiceBindingAttribute.cs
- ZipPackage.cs
- ExclusiveNamedPipeTransportManager.cs
- Roles.cs
- FileSystemInfo.cs
- QueryPrefixOp.cs
- EventSourceCreationData.cs
- ScriptingWebServicesSectionGroup.cs
- LoaderAllocator.cs
- EntitySetBaseCollection.cs
- TransformValueSerializer.cs
- ClockGroup.cs
- X509Certificate2.cs
- DemultiplexingClientMessageFormatter.cs
- MobileErrorInfo.cs
- MessageHeaderAttribute.cs
- UnauthorizedAccessException.cs
- SignedXml.cs
- WebControlAdapter.cs
- Gdiplus.cs
- BinaryKeyIdentifierClause.cs
- CustomAttributeBuilder.cs
- _ServiceNameStore.cs
- TypeUtil.cs
- TemplatedMailWebEventProvider.cs
- Thumb.cs
- TabItemAutomationPeer.cs
- SingleKeyFrameCollection.cs
- RowUpdatingEventArgs.cs
- SimpleBitVector32.cs
- SortFieldComparer.cs
- Journal.cs
- ReturnValue.cs
- PrintDialogException.cs
- BufferedStream.cs
- MULTI_QI.cs
- BitmapEffectState.cs
- HtmlControl.cs
- NameScopePropertyAttribute.cs
- PenLineJoinValidation.cs
- SqlDataSourceStatusEventArgs.cs
- Color.cs
- ChangeToolStripParentVerb.cs