OLD | NEW |
| (Empty) |
1 /// Copyright (c) Microsoft Corporation. All rights reserved. | |
2 | |
3 using System; | |
4 using System.Runtime.InteropServices; | |
5 | |
6 namespace Microsoft.VisualStudio.Project | |
7 { | |
8 internal static class UnsafeNativeMethods | |
9 { | |
10 [DllImport(ExternDll.Kernel32, EntryPoint = "GlobalLock", SetLas
tError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConventio
n = CallingConvention.StdCall)] | |
11 internal static extern IntPtr GlobalLock(IntPtr h); | |
12 | |
13 [DllImport(ExternDll.Kernel32, EntryPoint = "GlobalUnlock", SetL
astError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConvent
ion = CallingConvention.StdCall)] | |
14 internal static extern bool GlobalUnLock(IntPtr h); | |
15 | |
16 [DllImport(ExternDll.Kernel32, EntryPoint = "GlobalSize", SetLas
tError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConventio
n = CallingConvention.StdCall)] | |
17 internal static extern int GlobalSize(IntPtr h); | |
18 | |
19 [DllImport(ExternDll.Ole32, ExactSpelling = true, CharSet = Char
Set.Unicode)] | |
20 internal static extern int OleSetClipboard(Microsoft.VisualStudi
o.OLE.Interop.IDataObject dataObject); | |
21 | |
22 [DllImport(ExternDll.Ole32, ExactSpelling = true, CharSet = Char
Set.Unicode)] | |
23 internal static extern int OleGetClipboard(out Microsoft.VisualS
tudio.OLE.Interop.IDataObject dataObject); | |
24 | |
25 [DllImport(ExternDll.Ole32, ExactSpelling = true, CharSet = Char
Set.Unicode)] | |
26 internal static extern int OleFlushClipboard(); | |
27 | |
28 [DllImport(ExternDll.User32, ExactSpelling = true, CharSet = Cha
rSet.Unicode)] | |
29 internal static extern int OpenClipboard(IntPtr newOwner); | |
30 | |
31 [DllImport(ExternDll.User32, ExactSpelling = true, CharSet = Cha
rSet.Unicode)] | |
32 internal static extern int EmptyClipboard(); | |
33 | |
34 [DllImport(ExternDll.User32, ExactSpelling = true, CharSet = Cha
rSet.Unicode)] | |
35 internal static extern int CloseClipboard(); | |
36 | |
37 [DllImport(ExternDll.Comctl32, CharSet = CharSet.Auto)] | |
38 internal static extern int ImageList_GetImageCount(HandleRef him
l); | |
39 | |
40 [DllImport(ExternDll.Comctl32, CharSet = CharSet.Auto)] | |
41 internal static extern bool ImageList_Draw(HandleRef himl, int i
, HandleRef hdcDst, int x, int y, int fStyle); | |
42 | |
43 [DllImport(ExternDll.Shell32, EntryPoint = "DragQueryFileW", Set
LastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, CallingConven
tion = CallingConvention.StdCall)] | |
44 internal static extern uint DragQueryFile(IntPtr hDrop, uint iFi
le, char[] lpszFile, uint cch); | |
45 | |
46 [DllImport(ExternDll.User32, EntryPoint = "RegisterClipboardForm
atW", SetLastError = true, CharSet = CharSet.Unicode, ExactSpelling = true, Call
ingConvention = CallingConvention.StdCall)] | |
47 internal static extern ushort RegisterClipboardFormat(string for
mat); | |
48 | |
49 [DllImport(ExternDll.Shell32, EntryPoint = "SHGetSpecialFolderLo
cation")] | |
50 internal static extern int SHGetSpecialFolderLocation(IntPtr hwn
d, int csidl, [Out, MarshalAs(UnmanagedType.LPArray)] IntPtr[] ppidl); | |
51 | |
52 [DllImport(ExternDll.Shell32, EntryPoint = "SHGetPathFromIDList"
, CharSet = System.Runtime.InteropServices.CharSet.Auto)] | |
53 internal static extern bool SHGetPathFromIDList(IntPtr pidl, Int
Ptr pszPath); | |
54 } | |
55 } | |
56 | |
OLD | NEW |