/[pcsx2_0.9.7]/trunk/tools/GSDumpGUI/Library/NativeMethods.cs
ViewVC logotype

Contents of /trunk/tools/GSDumpGUI/Library/NativeMethods.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 280 - (show annotations) (download)
Thu Dec 23 12:02:12 2010 UTC (9 years, 2 months ago) by william
File size: 2721 byte(s)
re-commit (had local access denied errors when committing)
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4 using System.Security;
5 using System.Runtime.InteropServices;
6 using System.Drawing;
7
8 namespace GSDumpGUI
9 {
10 static public class NativeMethods
11 {
12 [SuppressUnmanagedCodeSecurityAttribute]
13 [DllImport("kernel32")]
14 public extern static IntPtr LoadLibrary(string lpLibFileName);
15
16 [SuppressUnmanagedCodeSecurityAttribute]
17 [DllImport("kernel32")]
18 public extern static bool FreeLibrary(IntPtr hLibModule);
19
20 [SuppressUnmanagedCodeSecurityAttribute]
21 [DllImport("kernel32", CharSet = CharSet.Ansi)]
22 public extern static IntPtr GetProcAddress(IntPtr hModule, string lpProcName);
23
24 [SuppressUnmanagedCodeSecurityAttribute]
25 [DllImport("kernel32", CharSet = CharSet.Ansi)]
26 public extern static int SetErrorMode(int Value);
27
28 [SuppressUnmanagedCodeSecurityAttribute]
29 [DllImport("kernel32", CharSet = CharSet.Ansi)]
30 public extern static int GetLastError();
31
32 [SuppressUnmanagedCodeSecurityAttribute]
33 [DllImport("user32", CharSet = CharSet.Ansi)]
34 public extern static short GetAsyncKeyState(int key);
35
36 [SuppressUnmanagedCodeSecurityAttribute]
37 [DllImport("user32", CharSet = CharSet.Ansi)]
38 public extern static int SetClassLong(IntPtr HWND, int index, long newlong);
39
40 [SuppressUnmanagedCodeSecurityAttribute]
41 [DllImport("user32", CharSet = CharSet.Ansi)]
42 public extern static bool IsWindowVisible(IntPtr HWND);
43
44 [SuppressUnmanagedCodeSecurityAttribute]
45 [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
46 [return: MarshalAs(UnmanagedType.Bool)]
47 public static extern bool PeekMessage(out NativeMessage message, IntPtr hwnd, uint messageFilterMin, uint messageFilterMax, uint flags);
48
49 [SuppressUnmanagedCodeSecurityAttribute]
50 [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
51 [return: MarshalAs(UnmanagedType.Bool)]
52 public static extern bool TranslateMessage(ref NativeMessage message);
53
54 [SuppressUnmanagedCodeSecurityAttribute]
55 [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = false)]
56 [return: MarshalAs(UnmanagedType.Bool)]
57 public static extern bool DispatchMessage(ref NativeMessage message);
58 }
59
60 [StructLayout(LayoutKind.Sequential)]
61 public struct NativeMessage
62 {
63 public IntPtr hWnd;
64 public uint msg;
65 public IntPtr wParam;
66 public IntPtr lParam;
67 public uint time;
68 public Point p;
69 }
70
71 }

  ViewVC Help
Powered by ViewVC 1.1.22