System.Runtime.InteropServices;
namespace WJsHome.Game.Utility
{
public class QMacro
{
[DllImport("BGKM5.dll", EntryPoint = "GetCommand")]
static extern IntPtr BGKM_GetCommand(int commandNum);
[StructLayout(LayoutKind.Sequential)]
class QMPLUGIN_CMD_INFO
{
public string commandName;
public string commandDescription;
public IntPtr handlerFunction;
public uint paramNumber;
}
delegate void Invoker(string parameters, StringBuilder returnValue);
static string BuildParameters(params object[] parameters)
{
StringBuilder sb = new StringBuilder();
for (int i = 0; i < parameters.Length; i++)
{
sb.Append(parameters.ToString());
if (i != parameters.Length - 1)
{