I'm working on the full deal for using one or two assemblies to load the BinaryChat plugins from my bot. This is the first major chunk of the BCP.h header in C#, excluding enumerations.
using System;
using System.Runtime.InteropServices;
#if DEBUG
using System.Diagnostics;
#endif
namespace ArmaBot.BCP
{
public unsafe delegate bool PluginInitProc(PluginInformation *lpInterfaceInfo);
public unsafe delegate bool MessageHookProc(uint dwConnectionId, byte MessageId,
byte *lpMessageData, int nMessageSize, IntPtr lParam);
public delegate bool EnumChannelProc(
[MarshalAs(UnmanagedType.LPTStr)] string lpszUniqueName,
[MarshalAs(UnmanagedType.LPTStr)] string lpszStatstring,
uint dwFlags, uint dwPing, bool bInvisible, uint dwAcctNumber, uint dwRegAuthority, IntPtr lParam);
public delegate bool ConnectionHookProc(uint dwConnectionId, uint dwEventCode,
ulong qwPlatformId, IntPtr lParam);
public delegate uint PluginTimerProc(uint dwTimeDelay, IntPtr lParam);
public delegate bool CommandHookProc(
[MarshalAs(UnmanagedType.LPStr)] string lpszMessage, [MarshalAs(UnmanagedType.LPStr)] string lpszSendingUser,
bool bFromTelnet, IntPtr lParam);
public delegate bool EventHookProc(IntPtr lParam);
public delegate bool EnumFilterProc([MarshalAs(UnmanagedType.LPTStr)] string lpszFilter, IntPtr lParam);
public delegate bool EnumPluginsProc(IntPtr hPlugin, IntPtr lParam);
// v5
public delegate bool PluginDestroyProc(IntPtr lParam);
public delegate bool OutputHookProc(uint dwReason, byte Color,
[MarshalAs(UnmanagedType.LPTStr)] string lpszMessage, IntPtr lParam);
public delegate void DeferredProcedureCallProc(IntPtr lParam);
public unsafe delegate bool MessageSendHookProc(uint dwConnectionId, byte MessageId, byte *lpMessageData,
uint nMessageSize, IntPtr lParam);
public delegate bool TestModifierSendHookProc(uint dwConnectionId,
[MarshalAs(UnmanagedType.LPTStr)] string lpszMessageText, IntPtr lParam);
public delegate bool TestModifierReceiveHookProc(uint dwConnectionId,
[MarshalAs(UnmanagedType.LPStr)] string lpszMessageText, IntPtr lParam);
public unsafe delegate bool PluginInitExProc(PluginInformationEx *lpInterfaceInfo);
public delegate bool PluginDestroyExProc(IntPtr lParam);
public unsafe delegate bool PluginControlProc(uint dwOperation, PluginInformation *lpInterfaceInfo,
IntPtr hBinaryChat, IntPtr lParam);
public delegate bool EnumInstancesProc(IntPtr hBinaryChat, IntPtr lParam);
public delegate bool EnumProfilesProc(
[MarshalAs(UnmanagedType.LPTStr)] string lpszProfileName, IntPtr lParam);
public delegate bool ClearMessageProc(byte MessageId);
public delegate bool IsMessageSetProc(byte MessageId);
public delegate bool SetMessageProc(byte MessageId);
public unsafe delegate bool QueueMessageProc(byte MessageId,
byte *lpMessageData, uint nMessageSize);
public delegate bool QueueChatMessageProc(
[MarshalAs(UnmanagedType.LPStr)] string lpszChatMessage, bool bFixD2Command);
public unsafe delegate bool QueryStateInformation(StateInformation *lpStateInfo);
public delegate bool QueryChannelInformationProc(
[MarshalAs(UnmanagedType.FunctionPtr)] EnumChannelProc lpCallback, IntPtr lParam);
public delegate bool CloseConnectionProc(uint dwConnectionId);
public unsafe delegate bool SendConnectionMessageProc(uint dwConnectionId, byte MessageId,
byte *lpMessageData, uint nMessageSize);
public delegate bool SetOutputColorProc(byte ColorId);
public delegate bool WriteOutputTimestampProc();
public delegate bool WriteOutputStringProc(
[MarshalAs(UnmanagedType.LPTStr)] string lpszString);
public delegate bool ProcessBotCommandProc(
[MarshalAs(UnmanagedType.LPTStr)] string lpszCommand);
[MarshalAs(UnmanagedType.LPStr)]
public delegate string GetRegistryPathProc();
public delegate bool ResetAwayIdleProc();
public delegate IntPtr GetWindowProc(uint dwWindowId);
public delegate bool InServiceProc();
public delegate IntPtr GetMenuProc(uint dwMenuId);
public delegate bool IsUserFilteredProc(
[MarshalAs(UnmanagedType.LPStr)] string lpszMessage);
public delegate bool EnumUserFiltersProc(
[MarshalAs(UnmanagedType.FunctionPtr)] EnumFilterProc lpCallback, IntPtr lParam);
public delegate bool EnumMessageFiltersProc(
[MarshalAs(UnmanagedType.FunctionPtr)] EnumFilterProc lpCallback, IntPtr lParam);
public delegate bool AddUserFilterProc(
[MarshalAs(UnmanagedType.LPStr)] string lpszFilter, bool bSaveFilters);
public delegate bool AddMessageFilterProc(
[MarshalAs(UnmanagedType.LPStr)] string lpszMessageFilter, bool bSaveFilters);
public delegate bool RemoveUserFilterProc(
[MarshalAs(UnmanagedType.LPStr)] string lpszFilter, bool bSaveFilters);
public delegate bool RemoveMessageFilterProc(
[MarshalAs(UnmanagedType.LPStr)] string lpszFilter, bool bSaveFilters);
public delegate bool MotifyMsgProc(byte bColor,
[MarshalAs(UnmanagedType.LPStr)] string lpszUser,
[MarshalAs(UnmanagedType.LPStr)] string lpszMessageFormat,
params object[] rest);
public delegate bool EnumLoadedPluginsProc(
[MarshalAs(UnmanagedType.FunctionPtr)] EnumPluginsProc lpCallback, IntPtr lParam);
public delegate bool ProcessBotCommandExProc(
[MarshalAs(UnmanagedType.LPStr)] string lpszMessage, uint dwFlags,
[MarshalAs(UnmanagedType.LPStr)] string lpszRemoteUser);
public delegate bool QueueChatMessageExProc(
[MarshalAs(UnmanagedType.LPStr)] string lpszMessage, uint dwFlags);
public delegate bool QueueDPCProc(
[MarshalAs(UnmanagedType.FunctionPtr)] DeferredProcedureCallProc DPC, IntPtr lParam);
public delegate IntPtr GetCurrentBinaryChatProc();
public delegate bool SetCurrentBinaryChatProc(IntPtr hBinaryChat);
public delegate bool EnumBinaryChatProfilesProc(
[MarshalAs(UnmanagedType.FunctionPtr)] EnumProfilesProc lpCallback, IntPtr lParam);
public delegate bool EnumBinaryChatsProc(
[MarshalAs(UnmanagedType.FunctionPtr)] EnumInstancesProc lpCallback, IntPtr lParam);
public delegate uint ControlBinaryChatProc(IntPtr hBinaryChat, uint dwControlCode,
IntPtr wParam, IntPtr lParam);
[MarshalAs(UnmanagedType.LPStr)]
public delegate string GetBinaryChatProfileNameProc(IntPtr hBinaryChat);
[MarshalAs(UnmanagedType.LPStr)]
public delegate string GetProfileRegistryPathProc();
public delegate IntPtr ExGetWindowProc(uint dwWindowId);
public unsafe delegate IntPtr PluginInformationToBinaryChatProc(PluginInformation *lpPluginInformation,
IntPtr hInterfaceList);
public unsafe delegate PluginInformation* BinaryChatToPluginInformation(IntPtr hBinaryChat,
IntPtr hInterfaceList);
public delegate uint GetBotIdProc(IntPtr hBinaryChat);
public delegate IntPtr GetBinaryChatProc(uint dwBotId);
}