forked from capitaogancho/subTee-gits-backups
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexport.cs
40 lines (33 loc) · 1.21 KB
/
export.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
28
29
30
31
32
33
34
35
36
37
38
39
40
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using RGiesecke.DllExport;
namespace Export
{
class Test
{
//void CALLBACK
//EntryPoint(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow);
[DllExport("EntryPoint", CallingConvention = CallingConvention.StdCall)]
public static void EntryPoint(IntPtr hwnd, IntPtr hinst, string lpszCmdLine, int nCmdShow )
{
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = "calc.exe";
Process.Start(info);
}
[DllExport("DllRegisterServer", CallingConvention = CallingConvention.StdCall)]
public static void DllRegisterServer()
{
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = "notepad.exe";
Process.Start(info);
}
[DllExport("DllUnregisterServer", CallingConvention = CallingConvention.StdCall)]
public static void DllUnregisterServer()
{
ProcessStartInfo info = new ProcessStartInfo();
info.FileName = "powershell.exe";
Process.Start(info);
}
}
}