summaryrefslogtreecommitdiff
path: root/WinKeyRecover/NativeMethods/NativeMethods.cs
blob: f0817ae7c9452c6f27312412d1f29c36a1ef9606 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace WinKeyRecover
{
    internal class NativeMethods
    {
        [DllImport("kernel32.dll")]
        public static extern IntPtr LoadLibrary(string dllToLoad);

        [DllImport("kernel32.dll")]
        public static extern bool FreeLibrary(IntPtr hModule);

        [DllImport("kernel32.dll")]
        public static extern IntPtr GetProcAddress(IntPtr hModule, string procedureName);

        [UnmanagedFunctionPointer(CallingConvention.StdCall)]
        public delegate int PidGenX([MarshalAs(UnmanagedType.LPWStr)] string ProductKey, [MarshalAs(UnmanagedType.LPWStr)] string PkeyPath, [MarshalAs(UnmanagedType.LPWStr)] string MSPID, int UnknownUsage, IntPtr ProductID, IntPtr DigitalProductID, IntPtr DigitalProductID4);
    }
}