www.pudn.com > Fetion.rar > CallMeHelper.cs
namespace Imps.Client.Pc
{
using Imps.Client.Utils;
using System;
using System.Text;
public static class CallMeHelper
{
public const string CallMeMessage = "FetionCallMeMessage";
public const string CallMeShareMemory = "CallMeShareMemory";
public const int CallMeShareMemorySize = 0x400;
public const int FetionProcessFlag = 0x65;
public static int WM_FETION_CALLME;
public static bool TrySendCallMeMessage(string[] args, IntPtr mainFormHandle)
{
if (args.Length >= 1)
{
foreach (string str in args)
{
if (CallMe.ParseCallMeParams(str) == 0)
{
try
{
ShareMemory memory = ShareMemory.Create("CallMeShareMemory", 0x400, false);
if (memory != null)
{
using (memory)
{
byte[] bytes = Encoding.Default.GetBytes(str);
memory.Write(bytes, 0, bytes.Length);
InnerWin32.SendMessage((IntPtr) 0xffff, WM_FETION_CALLME, 0x65, mainFormHandle.ToInt32());
}
}
return true;
}
catch (Exception exception)
{
ClientLogger.WriteException(exception);
}
}
}
}
return false;
}
}
}