0 Members and 3 Guests are viewing this topic.
Автор темы, поделитесь новостями, пожалуйста! Меня тоже разработка плагина на C# интересует.
using System;using System.Runtime.InteropServices;using MirandaNG;using static MirandaNG.Core;namespace TestPluginDotNet{ public class TestPlugin : Plugin { [DllImport("user32.dll", CharSet = CharSet.Unicode)] public static extern int MessageBox(IntPtr hWnd, string text, string caption, uint type); private IntPtr hEvent; private IntPtr hService; protected override void Load() { hEvent = CreateHookableEvent("test/test"); HookEvent("test/test", OnHook); hService = CreateServiceFunction("test/test", Service); HookEvent("Miranda/System/ModulesLoaded", OnModulesLoaded); } private IntPtr Service(IntPtr wParam, IntPtr lParam) { NotifyEventHooks(hEvent, IntPtr.Zero, IntPtr.Zero); return IntPtr.Zero; } private int OnHook(IntPtr wParam, IntPtr lParam) { MessageBox(IntPtr.Zero, "It's ALIVE!!!", "", 0); return 0; } private int OnModulesLoaded(IntPtr wParam, IntPtr lParam) { CallService("test/test", IntPtr.Zero, IntPtr.Zero); return 0; } }}