步步为盈
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
959 B

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Xml.Linq;
namespace QYDongDongTool.Unitls
{
public class MP
{
[DllImport("DllInLine.dll", EntryPoint = "Hook", CallingConvention = CallingConvention.Cdecl)]
public static extern int DllHook(int pid, string dLLPath);
[DllImport("DllInLine.dll", EntryPoint = "UnHook", CallingConvention = CallingConvention.Cdecl)]
public static extern int UnHookDll(int pid);
public static bool Hook(int pid)
{
string sDllPath = System.Environment.CurrentDirectory+ "\\sendPhone.dll";
return DllHook(pid, sDllPath) ==0;
}
public static bool UnHook(int pid)
{
int val= UnHookDll(pid);
return val==0;
}
}
}