132 references to UnsafeNativeMethods
WindowsBase (132)
Base\MS\Internal\IO\Packaging\CompoundFile\NativeCompoundFileAPIs.cs (5)
281MS.Win32.UnsafeNativeMethods.SafeReleaseComObject((object) _unsafeStorage); 674MS.Win32.UnsafeNativeMethods.SafeReleaseComObject((object) _unsafeStream); 856MS.Win32.UnsafeNativeMethods.SafeReleaseComObject((object) _unsafeEnumSTATPROPSETSTG); 946MS.Win32.UnsafeNativeMethods.SafeReleaseComObject((object) _unsafePropertyStorage); 1246MS.Win32.UnsafeNativeMethods.SafeReleaseComObject((object) _unsafeEnumSTATSTG);
Base\MS\Internal\Utilities.cs (2)
51UnsafeNativeMethods.HRESULT.Check(UnsafeNativeMethods.DwmIsCompositionEnabled(out isDesktopCompositionEnabled));
Base\System\Windows\SplashScreen.cs (46)
178_defWndProc = new MS.Win32.NativeMethods.WndProc(UnsafeNativeMethods.DefWindowProc); 193_wndClass = MS.Win32.UnsafeNativeMethods.IntRegisterClassEx(wndClass); 200int screenWidth = MS.Win32.UnsafeNativeMethods.GetSystemMetrics(SM.CXSCREEN); 201int screenHeight = MS.Win32.UnsafeNativeMethods.GetSystemMetrics(SM.CYSCREEN); 213IntPtr hWnd = MS.Win32.UnsafeNativeMethods.CreateWindowEx( 221IntPtr hScreenDC = UnsafeNativeMethods.GetDC(new HandleRef()); 222IntPtr memDC = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, hScreenDC)); 223IntPtr hOldBitmap = UnsafeNativeMethods.SelectObject(new HandleRef(null, memDC), hBitmap.MakeHandleRef(null).Handle); 234bool result = UnsafeNativeMethods.UpdateLayeredWindow(hWnd, hScreenDC, newLocation, newSize, 237UnsafeNativeMethods.SelectObject(new HandleRef(null, memDC), hOldBitmap); 238UnsafeNativeMethods.ReleaseDC(new HandleRef(), new HandleRef(null, memDC)); 239UnsafeNativeMethods.ReleaseDC(new HandleRef(), new HandleRef(null, hScreenDC)); 243UnsafeNativeMethods.HRESULT.Check(Marshal.GetHRForLastWin32Error()); 304IntPtr prevHwnd = UnsafeNativeMethods.SetActiveWindow(new HandleRef(null, _hwnd)); 341UnsafeNativeMethods.UpdateLayeredWindow(_hwnd, IntPtr.Zero, null, null, IntPtr.Zero, null, 0, ref _blendFunc, NativeMethods.ULW_ALPHA); 361if (UnsafeNativeMethods.IsWindow(hwnd)) 363UnsafeNativeMethods.IntDestroyWindow(hwnd); 369UnsafeNativeMethods.DeleteObject(_hBitmap.MakeHandleRef(null).Handle); 377if (UnsafeNativeMethods.IntUnregisterClass(new IntPtr(_wndClass), _hInstance) != 0) 406UnsafeNativeMethods.HRESULT.Check( 407UnsafeNativeMethods.WIC.CreateImagingFactory(UnsafeNativeMethods.WIC.WINCODEC_SDK_VERSION, out pImagingFactory)); 410UnsafeNativeMethods.HRESULT.Check( 411UnsafeNativeMethods.WIC.CreateStream(pImagingFactory, out pIStream)); 413UnsafeNativeMethods.HRESULT.Check( 414UnsafeNativeMethods.WIC.InitializeStreamFromMemory(pIStream, pImgBuffer, (uint)cImgBufferLen)); 418UnsafeNativeMethods.HRESULT.Check( 419UnsafeNativeMethods.WIC.CreateDecoderFromStream(pImagingFactory, pIStream, 424UnsafeNativeMethods.HRESULT.Check( 425UnsafeNativeMethods.WIC.GetFrame(pDecoder, 0, out pDecodedFrame)); 427UnsafeNativeMethods.HRESULT.Check( 428UnsafeNativeMethods.WIC.CreateFormatConverter(pImagingFactory, out pBitmapSourceFormatConverter)); 431Guid pixelFormat = UnsafeNativeMethods.WIC.WICPixelFormat32bppPBGRA; 432UnsafeNativeMethods.HRESULT.Check( 433UnsafeNativeMethods.WIC.InitializeFormatConverter(pBitmapSourceFormatConverter, pDecodedFrame, 4350, UnsafeNativeMethods.WIC.WICPaletteType.WICPaletteTypeCustom)); 437UnsafeNativeMethods.HRESULT.Check( 438UnsafeNativeMethods.WIC.CreateBitmapFlipRotator(pImagingFactory, out pBitmapFlipRotator)); 440UnsafeNativeMethods.HRESULT.Check( 441UnsafeNativeMethods.WIC.InitializeBitmapFlipRotator(pBitmapFlipRotator, pBitmapSourceFormatConverter, 442UnsafeNativeMethods.WIC.WICBitmapTransformOptions.WICBitmapTransformFlipVertical)); 444UnsafeNativeMethods.HRESULT.Check( 445UnsafeNativeMethods.WIC.GetBitmapSize(pBitmapFlipRotator, out width, out height)); 456_hBitmap = UnsafeNativeMethods.CreateDIBSection(new HandleRef(), ref bmInfo, 0 /* DIB_RGB_COLORS*/, ref pBitmapBits, null, 0); 460UnsafeNativeMethods.HRESULT.Check( 461UnsafeNativeMethods.WIC.CopyPixels(pBitmapFlipRotator, ref rect, stride, stride * height, pBitmapBits));
Base\System\Windows\Threading\Dispatcher.cs (12)
38_msgProcessQueue = UnsafeNativeMethods.RegisterWindowMessage("DispatcherProcessQueue"); 2371UnsafeNativeMethods.ITfMessagePump messagePump = GetMessagePump(); 2378result = UnsafeNativeMethods.GetMessageW(ref msg, 2421private UnsafeNativeMethods.ITfMessagePump GetMessagePump() 2423UnsafeNativeMethods.ITfMessagePump messagePump = null; 2434UnsafeNativeMethods.ITfThreadMgr threadManager; 2441messagePump = threadManager as UnsafeNativeMethods.ITfMessagePump; 2479UnsafeNativeMethods.TranslateMessage(ref msg); 2480UnsafeNativeMethods.DispatchMessage(ref msg); 2598retVal = UnsafeNativeMethods.MsgWaitForMultipleObjectsEx(0, null, 0, 2649UnsafeNativeMethods.PeekMessage(ref msg, new HandleRef(this, _window.Value.Handle), _msgProcessQueue, _msgProcessQueue, NativeMethods.PM_REMOVE); 2702bool succeeded = UnsafeNativeMethods.TryPostMessage(new HandleRef(this, _window.Value.Handle), _msgProcessQueue, IntPtr.Zero, IntPtr.Zero);
Base\System\Windows\Threading\DispatcherSynchronizationContext.cs (1)
104return MS.Win32.UnsafeNativeMethods.WaitForMultipleObjectsEx(waitHandles.Length, waitHandles, waitAll, millisecondsTimeout, false);
Shared\MS\Internal\ReaderWriterLockWrapper.cs (1)
321return MS.Win32.UnsafeNativeMethods.WaitForMultipleObjectsEx(waitHandles.Length, waitHandles, waitAll, millisecondsTimeout, false);
Shared\MS\Internal\TextServicesLoader.cs (3)
107internal static UnsafeNativeMethods.ITfThreadMgr Load() 109UnsafeNativeMethods.ITfThreadMgr threadManager; 120if (UnsafeNativeMethods.TF_CreateThreadMgr(out threadManager) == NativeMethods.S_OK)
Shared\MS\Win32\HwndSubclass.cs (10)
59DetachMessage = UnsafeNativeMethods.RegisterWindowMessage("HwndSubclass.DetachMessage"); 62IntPtr hModuleUser32 = UnsafeNativeMethods.GetModuleHandle(ExternDll.User32); 63IntPtr address = UnsafeNativeMethods.GetProcAddress(new HandleRef(null,hModuleUser32), "DefWindowProcW"); 302UnsafeNativeMethods.UnsafeSendMessage(hwnd, DetachMessage, subclass, (IntPtr) iForce); 469IntPtr oldWndProc = UnsafeNativeMethods.GetWindowLongPtr(new HandleRef(this,hwnd), NativeMethods.GWL_WNDPROC); 529return UnsafeNativeMethods.CallWindowProc(oldWndProc, hwnd, (int)msg, wParam, lParam); 544IntPtr oldWndProc2 = (IntPtr)UnsafeNativeMethods.CriticalSetWindowLong(_hwndHandleRef, NativeMethods.GWL_WNDPROC, _attachedWndProc); 592NativeMethods.WndProc currentWndProc = UnsafeNativeMethods.GetWindowLongWndProc(new HandleRef(this,_hwndAttached)); 609UnsafeNativeMethods.CriticalSetWindowLong(_hwndHandleRef, NativeMethods.GWL_WNDPROC, _oldWndProc); 672return UnsafeNativeMethods.CallWindowProc(DefWndProc, hwnd, msg, wParam, lParam);
Shared\MS\Win32\HwndWrapper.cs (8)
47s_msgGCMemory = UnsafeNativeMethods.RegisterWindowMessage("HwndWrapper.GetGCMemMessage"); 94IntPtr hNullBrush = UnsafeNativeMethods.CriticalGetStockObject(NativeMethods.NULL_BRUSH); 101IntPtr hInstance = UnsafeNativeMethods.GetModuleHandle( null ); 146_classAtom = UnsafeNativeMethods.RegisterClassEx(wc_d); 151_handle = new SecurityCriticalDataClass<IntPtr>(UnsafeNativeMethods.CreateWindowEx(exStyle, 419UnsafeNativeMethods.DestroyWindow(new HandleRef(null, handle.Value)); 443IntPtr hInstance = UnsafeNativeMethods.GetModuleHandle(null); 444UnsafeNativeMethods.UnregisterClass(
Shared\MS\Win32\ManagedWndProcTracker.cs (6)
108int windowStyle = UnsafeNativeMethods.GetWindowLong(new HandleRef(null,hwnd), NativeMethods.GWL_STYLE); 127UnsafeNativeMethods.SendMessage(hwnd, HwndSubclass.DetachMessage, 174result = UnsafeNativeMethods.SetWindowLong(new HandleRef(null,hwnd), NativeMethods.GWL_WNDPROC, defWindowProc); 191UnsafeNativeMethods.PostMessage(new HandleRef(null,hwnd), WindowMessage.WM_CLOSE, IntPtr.Zero, IntPtr.Zero); 231IntPtr hModule = UnsafeNativeMethods.GetModuleHandle(ExternDll.User32); 236return UnsafeNativeMethods.GetProcAddress(new HandleRef(null, hModule), export);
Shared\MS\Win32\NativeMethodsCLR.cs (2)
4826VARIANT varStruct = (VARIANT)UnsafeNativeMethods.PtrToStructure(val, typeof(VARIANT)); 4830Guid guid =(Guid)UnsafeNativeMethods.PtrToStructure(val, typeof(Guid));
Shared\MS\Win32\NativeMethodsOther.cs (3)
308return UnsafeNativeMethods.DeleteObject(handle); 350return UnsafeNativeMethods.DestroyIcon(handle); 393return UnsafeNativeMethods.DestroyCursor( handle );
Shared\MS\Win32\SafeNativeMethodsOther.cs (1)
288return UnsafeNativeMethods.GetWindowLong(hWnd, nIndex);
Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (29)
801public static extern void DoDragDrop(IComDataObject dataObject, UnsafeNativeMethods.IOleDropSource dropSource, int allowedEffects, int[] finalEffect); 1533public static extern int RegisterDragDrop(HandleRef hwnd, UnsafeNativeMethods.IOleDropTarget target); 2327out UnsafeNativeMethods.IOleInPlaceFrame ppFrame, 2329out UnsafeNativeMethods.IOleInPlaceUIWindow ppDoc, 2463UnsafeNativeMethods.IOleInPlaceActiveObject pActiveObject, 2591UnsafeNativeMethods.IOleInPlaceActiveObject pActiveObject, 2634UnsafeNativeMethods.IOleInPlaceUIWindow pUIWindow, 2706UnsafeNativeMethods.IOleClientSite pClientSite); 2709UnsafeNativeMethods.IOleClientSite GetClientSite(); 2761UnsafeNativeMethods.IOleClientSite pActiveSite, 2770int EnumVerbs(out UnsafeNativeMethods.IEnumOLEVERB e); 2840UnsafeNativeMethods.IOleClientSite pClientSite); 2843int GetClientSite(out UnsafeNativeMethods.IOleClientSite site); 2895UnsafeNativeMethods.IOleClientSite pActiveSite, 2904int EnumVerbs(out UnsafeNativeMethods.IEnumOLEVERB e); 3076UnsafeNativeMethods.IEnumVariant[] ppenum); 3150UnsafeNativeMethods.IStream pstm, 3189UnsafeNativeMethods.IStream Clone(); 3578UnsafeNativeMethods.OLECMDF QueryStatusWB([In] UnsafeNativeMethods.OLECMDID cmdID); 3580void ExecWB([In] UnsafeNativeMethods.OLECMDID cmdID, 3581[In] UnsafeNativeMethods.OLECMDEXECOPT cmdexecopt, 3724UnsafeNativeMethods.IOleInPlaceActiveObject activeObject, 3728UnsafeNativeMethods.IOleInPlaceFrame frame, 3730UnsafeNativeMethods.IOleInPlaceUIWindow doc); 3764UnsafeNativeMethods.IOleInPlaceUIWindow doc, 3789UnsafeNativeMethods.IOleDropTarget pDropTarget, 3791out UnsafeNativeMethods.IOleDropTarget ppDropTarget); 4089hrcurrent = UnsafeNativeMethods.VariantClear((IntPtr)(a + VariantSize * i));
Shared\MS\Win32\UnsafeNativeMethodsOther.cs (3)
163UnsafeNativeMethods.IInternetSecurityManager secMgr, 302if(result == UnsafeNativeMethods.WAIT_FAILED) 622return UnsafeNativeMethods.UnmapViewOfFileNoThrow(new HandleRef(null, handle));