I'm making a C# DLL which will be injected in Skype, it is supposed to display a messagebox.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using System.Windows.Forms;
namespace L3n_Hack_DLL
{
public class Class1
{
[DllImport("kernel32.dll")]
public static extern IntPtr OpenProcess(int dwDesiredAccess, bool bInheritHandle, int dwProcessId);
[DllImport("kernel32.dll")]
public static extern bool ReadProcessMemory(int hProcess,
int lpBaseAddress, byte[] lpBuffer, int dwSize, ref int lpNumberOfBytesRead);
public static void Main()
{
MessageBox.Show("working", "teste", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
Anyways, when injected, it doesn't show anything, the OpenProcess() and ReadProcessMemory() methods are for later.
My question is, where does a DLL start when injected?
Shouldn't it start in static void Main()?