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