-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathSafeNativeMethods.cs
27 lines (24 loc) · 1 KB
/
SafeNativeMethods.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
////////////////////////////////////////////////////////////////////////
//
// This file is part of pdn-twainable-plus, an Effect plugin for
// Paint.NET that imports images from TWAIN devices.
//
// Copyright (c) 2014, 2017, 2018 Nicholas Hayes
//
// This file is licensed under the MIT License.
// See LICENSE.txt for complete licensing and attribution information.
//
////////////////////////////////////////////////////////////////////////
using System;
using System.Runtime.InteropServices;
namespace TwainablePlus
{
[System.Security.SuppressUnmanagedCodeSecurity]
internal static class SafeNativeMethods
{
[DllImport("user32.dll", ExactSpelling = true)]
internal static extern uint RegisterWindowMessageW([In(), MarshalAs(UnmanagedType.LPWStr)] string lpString);
[DllImport("user32.dll", ExactSpelling = true)]
internal static extern IntPtr PostMessageW([In()] IntPtr hWnd, [In()] uint Msg, [In()] UIntPtr wParam, [In()] IntPtr lParam);
}
}