Violent Mode
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
<Grid.Background>
|
||||
<ImageBrush ImageSource="03.png"/>
|
||||
</Grid.Background>
|
||||
<GroupBox Header="GroupBox" HorizontalAlignment="Left" Height="100" Margin="477,169,0,0" VerticalAlignment="Top" Width="187"/>
|
||||
<GroupBox Header="提取模式" HorizontalAlignment="Left" Height="82" Margin="52,116,0,0" VerticalAlignment="Top" Width="144"/>
|
||||
<TextBox x:Name="StartUpEdit" HorizontalAlignment="Left" Height="30" Margin="96,10,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="163" FontSize="22" TextChanged="StartUpEdit_TextChanged"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="6,20,0,0" TextWrapping="Wrap" Text="启动目标:" VerticalAlignment="Top" Height="29" FontSize="16"/>
|
||||
@@ -23,7 +24,7 @@
|
||||
<CheckBox x:Name="EnvioMode" Content="暴力替换" HorizontalAlignment="Left" Margin="10,95,0,0" VerticalAlignment="Top" Height="16" Click="EnvioMode_Click"/>
|
||||
<RadioButton x:Name="OM_GPY" Content="GetGlyphOutLine" HorizontalAlignment="Left" Margin="76,148,0,0" VerticalAlignment="Top" Checked="OM_GPY_Checked"/>
|
||||
<RadioButton x:Name="OM_TOT" Content="TextOut" HorizontalAlignment="Left" Margin="76,168,0,0" VerticalAlignment="Top" Checked="OM_TOT_Checked"/>
|
||||
<TextBox x:Name="OutPutLog" HorizontalAlignment="Left" Height="133" Margin="52,216,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="373">
|
||||
<TextBox x:Name="OutPutLog" HorizontalAlignment="Left" Height="133" Margin="52,216,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="373">
|
||||
<TextBox.Background>
|
||||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="#67DBFEFF" Offset="0.528"/>
|
||||
@@ -32,5 +33,17 @@
|
||||
</TextBox.Background>
|
||||
</TextBox>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="2,198,0,0" TextWrapping="Wrap" Text="输出记录:" VerticalAlignment="Top"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="325,13,0,0" TextWrapping="Wrap" Text="当前的ID:" VerticalAlignment="Top" FontSize="16"/>
|
||||
<TextBox IsReadOnly="True" x:Name="IDnPut" HorizontalAlignment="Left" Height="30" Margin="409,10,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="146" FontSize="18"/>
|
||||
<TextBox x:Name="TRAN_OPT" HorizontalAlignment="Left" Height="107" Margin="409,56,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="284" FontSize="16">
|
||||
<TextBox.Background>
|
||||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="#75E8FFE2" Offset="0"/>
|
||||
<GradientStop Color="#FF34FF00" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</TextBox.Background>
|
||||
</TextBox>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="292,57,0,0" TextWrapping="Wrap" Text="转换后的文本:" VerticalAlignment="Top" Height="29" FontSize="16"/>
|
||||
<CheckBox x:Name="REASE" Content="去除重复字符(ああー>あ)" HorizontalAlignment="Left" Margin="497,198,0,0" VerticalAlignment="Top" Checked="CheckBox_Checked" Unchecked="REASE_Unchecked"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -11,6 +11,9 @@ using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
using System.Threading;
|
||||
using System.Windows.Threading;
|
||||
|
||||
namespace cs2_chs
|
||||
{
|
||||
/// <summary>
|
||||
@@ -19,10 +22,68 @@ namespace cs2_chs
|
||||
public partial class Advance : Window
|
||||
{
|
||||
public bool enChanged = false;
|
||||
static public Thread threadRestore;
|
||||
bool enFaileden = false;
|
||||
|
||||
public Advance()
|
||||
{
|
||||
InitializeComponent();
|
||||
REASE.IsChecked = false;
|
||||
this.Closing += Window_Closing;
|
||||
Thread threadExit = new Thread(delegate ()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
this.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate ()
|
||||
{
|
||||
if (MainWindow.nID != 0)
|
||||
IDnPut.Text = Convert.ToString((*(uint*)MainWindow.nID) - 1, 10);
|
||||
});
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
}
|
||||
});
|
||||
threadExit.Start();
|
||||
|
||||
threadRestore = new Thread(delegate ()
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
||||
string loacl = new string((char*)MainWindow.ns_str);
|
||||
string lobnob = "";
|
||||
if (enFaileden)
|
||||
{
|
||||
char lob = '\0';
|
||||
foreach (char t in loacl)
|
||||
{
|
||||
if (t != lob)
|
||||
{
|
||||
lobnob += t;
|
||||
lob = t;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lobnob = loacl;
|
||||
//MessageBox.Show("");
|
||||
}
|
||||
this.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate ()
|
||||
{
|
||||
TRAN_OPT.Text = lobnob;
|
||||
OutPutLog.Text = loacl;
|
||||
});
|
||||
Thread.Sleep(50);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
@@ -55,6 +116,11 @@ namespace cs2_chs
|
||||
OM_TOT.IsEnabled = true;
|
||||
OutPutLog.IsEnabled = true;
|
||||
MainWindow.EndReplace();
|
||||
MainWindow.thisPfc.SRC_OUTPUT.IsReadOnly = false;
|
||||
unsafe
|
||||
{
|
||||
(*(bool*)MainWindow.pblockRestoreSrc) = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -62,6 +128,11 @@ namespace cs2_chs
|
||||
OM_TOT.IsEnabled = false;
|
||||
OutPutLog.IsEnabled = false;
|
||||
MainWindow.StartReplace();
|
||||
MainWindow.thisPfc.SRC_OUTPUT.IsReadOnly = true;
|
||||
unsafe
|
||||
{
|
||||
(*(bool*)MainWindow.pblockRestoreSrc) = false;
|
||||
}
|
||||
}
|
||||
MessageBox.Show("👴知道🌶!\n🍋の🐍☞已经应用🌶!\n暴力提取之外的设置将会在下次启动时按照更改后的设置工作。");
|
||||
}
|
||||
@@ -111,9 +182,18 @@ namespace cs2_chs
|
||||
{
|
||||
unsafe
|
||||
{
|
||||
string loacl = new string((char*)MainWindow.ns_str);
|
||||
OutPutLog.Text = loacl;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckBox_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
enFaileden = true;
|
||||
}
|
||||
|
||||
private void REASE_Unchecked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
enFaileden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:cs2_chs"
|
||||
mc:Ignorable="d"
|
||||
Title="Text Controler" Height="200" Width="600" ResizeMode="NoResize" Visibility="Visible" UseLayoutRounding="False">
|
||||
Title="Text Controler" Height="284.5" Width="600" ResizeMode="NoResize" Visibility="Visible" UseLayoutRounding="False">
|
||||
<Grid Loaded="Grid_Loaded" MouseUp="Grid_MouseUp" MouseDown="Grid_MouseDown" Unloaded="Grid_Unloaded">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="74*"/>
|
||||
@@ -14,7 +14,7 @@
|
||||
<Grid.Background>
|
||||
<ImageBrush ImageSource="01.jpg"/>
|
||||
</Grid.Background>
|
||||
<TextBox x:Name="TEXT_INPUT" HorizontalAlignment="Left" Height="120" Margin="10,10,0,0" TextWrapping="Wrap" Text="TextBox" VerticalAlignment="Top" Width="574" AcceptsReturn="True" Grid.ColumnSpan="2">
|
||||
<TextBox x:Name="TEXT_INPUT" HorizontalAlignment="Left" Height="100" Margin="10,115,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="573" AcceptsReturn="True" Grid.ColumnSpan="2" FontSize="18">
|
||||
<TextBox.BorderBrush>
|
||||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="#FFFFB700" Offset="0.027"/>
|
||||
@@ -29,7 +29,7 @@
|
||||
</LinearGradientBrush>
|
||||
</TextBox.Background>
|
||||
</TextBox>
|
||||
<Button x:Name="apply" Content="Apply" HorizontalAlignment="Left" Height="25" Margin="348.267,135,0,0" VerticalAlignment="Top" Width="88" Click="Button_Click" Grid.Column="1">
|
||||
<Button x:Name="apply" Content="Apply" HorizontalAlignment="Left" Height="25" Margin="348,220,0,0" VerticalAlignment="Top" Width="88" Click="Button_Click" Grid.Column="1">
|
||||
<Button.Background>
|
||||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="Red" Offset="0"/>
|
||||
@@ -37,8 +37,8 @@
|
||||
</LinearGradientBrush>
|
||||
</Button.Background>
|
||||
</Button>
|
||||
<ProgressBar x:Name="PBS" HorizontalAlignment="Left" Height="25" Margin="103,135,0,0" VerticalAlignment="Top" Width="388" Visibility="Collapsed" Grid.ColumnSpan="2"/>
|
||||
<Button Content="Show Japanese" HorizontalAlignment="Left" Margin="10,135,0,0" VerticalAlignment="Top" Width="88" Height="25" Click="Button_Click_1">
|
||||
<ProgressBar x:Name="PBS" HorizontalAlignment="Left" Height="25" Margin="103,220,0,0" Visibility="Collapsed" VerticalAlignment="Top" Width="388" Grid.ColumnSpan="2"/>
|
||||
<Button Content="Show Japanese" HorizontalAlignment="Left" Margin="10,220,0,0" VerticalAlignment="Top" Width="88" Height="25" Click="Button_Click_1">
|
||||
<Button.Background>
|
||||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="#FFFFEE00" Offset="0"/>
|
||||
@@ -46,6 +46,21 @@
|
||||
</LinearGradientBrush>
|
||||
</Button.Background>
|
||||
</Button>
|
||||
<TextBox x:Name="SRC_OUTPUT" IsReadOnly="True" HorizontalAlignment="Left" Height="100" Margin="10,10,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="574" Grid.ColumnSpan="2" FontSize="18">
|
||||
<TextBox.BorderBrush>
|
||||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="#FF05FF6B" Offset="1"/>
|
||||
<GradientStop Color="#FF0FFBFF"/>
|
||||
</LinearGradientBrush>
|
||||
</TextBox.BorderBrush>
|
||||
<TextBox.Background>
|
||||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="White" Offset="0"/>
|
||||
<GradientStop Color="#FFFF0089" Offset="1"/>
|
||||
<GradientStop Color="#70FFFFFF"/>
|
||||
</LinearGradientBrush>
|
||||
</TextBox.Background>
|
||||
</TextBox>
|
||||
</Grid>
|
||||
<Window.Resources>
|
||||
<RoutedUICommand x:Key="ShowMainWindow" Text="ShowMainWindow" />
|
||||
|
||||
@@ -38,6 +38,7 @@ namespace cs2_chs
|
||||
//TestA
|
||||
public static InitData initdata = new InitData();
|
||||
public Advance AdvanceSetting = new Advance();//ChangeGToT
|
||||
public static MainWindow thisPfc;
|
||||
|
||||
[DllImport("cs2_patch.dll", EntryPoint = "ChangeGToT")]
|
||||
public static extern void ChangeGToT();
|
||||
@@ -50,12 +51,17 @@ namespace cs2_chs
|
||||
public static extern void StartReplace();
|
||||
[DllImport("cs2_patch.dll", EntryPoint = "EndReplace")]
|
||||
public static extern void EndReplace();
|
||||
[DllImport("Kernel32.dll", EntryPoint = "WaitOnAddress")]
|
||||
public extern static bool WaitOnAddress(uint Address, uint CompareAddress, uint AddressSize, uint dwMilliseconds);
|
||||
[DllImport("Kernel32.dll", EntryPoint = "WakeByAddressSingle")]
|
||||
public extern static void WakeByAddressSingle(uint Address);
|
||||
|
||||
[DllImport("Kernel32.dll", EntryPoint = "WaitForSingleObject")]
|
||||
public extern static int WaitForSingleObject(uint hHandle, uint dwMilliseconds);
|
||||
[DllImport("cs2_patch.dll", EntryPoint = "InjectSelfTo")]
|
||||
public static extern uint pStart(string path);
|
||||
[DllImport("cs2_patch.dll", EntryPoint = "CreateDataExport")]
|
||||
public static extern void CreateData([MarshalAs(UnmanagedType.LPWStr)] string path);
|
||||
public static extern void CreateData([MarshalAs(UnmanagedType.LPWStr)] string src,[MarshalAs(UnmanagedType.LPWStr)] string path);
|
||||
[DllImport("Kernel32.dll", EntryPoint = "TerminateProcess")]
|
||||
public static extern bool TerminateProcess(uint hThread, uint dwExitCode);
|
||||
[DllImport("Kernel32.dll", EntryPoint = "OpenProcess")]
|
||||
@@ -68,6 +74,8 @@ namespace cs2_chs
|
||||
public static uint ns_str = 0;
|
||||
public static uint ptPid = 0;
|
||||
public static uint ppMode;
|
||||
public static uint nID;
|
||||
public static uint pblockRestoreSrc;
|
||||
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
if(this.Visibility != Visibility.Visible){
|
||||
@@ -105,7 +113,7 @@ namespace cs2_chs
|
||||
// MessageBox.Show("");
|
||||
TestA();
|
||||
int hMod = DllTools.GetModuleHandleA("cs2_patch.dll");
|
||||
|
||||
thisPfc = this;
|
||||
if (!initdata.successedLoad)
|
||||
{
|
||||
MessageBox.Show("error:failed to load Init.xml!","Error!",MessageBoxButton.OK,MessageBoxImage.Error);
|
||||
@@ -126,8 +134,13 @@ namespace cs2_chs
|
||||
AdvanceSetting.AddressEdit.Foreground = new SolidColorBrush(Colors.Black);
|
||||
AdvanceSetting.EnvioMode.IsChecked = initdata.Envio;
|
||||
AdvanceSetting.EnvioMode.Foreground = new SolidColorBrush(Colors.Black);
|
||||
|
||||
|
||||
pblockRestoreSrc = (uint)DllTools.GetProcAddress(hMod, "blockRestoreSrc");
|
||||
unsafe
|
||||
{
|
||||
(*(bool*)pblockRestoreSrc) = initdata.Envio;
|
||||
}
|
||||
|
||||
// MessageBox.Show("");
|
||||
switch (initdata.VioMode)
|
||||
{
|
||||
@@ -148,6 +161,7 @@ namespace cs2_chs
|
||||
AdvanceSetting.OM_GPY.IsEnabled = true;
|
||||
AdvanceSetting.OM_TOT.IsEnabled = true;
|
||||
AdvanceSetting.OutPutLog.IsEnabled = true;
|
||||
SRC_OUTPUT.IsReadOnly = false;
|
||||
EndReplace();
|
||||
}
|
||||
else
|
||||
@@ -163,7 +177,8 @@ namespace cs2_chs
|
||||
ms_str = (uint)DllTools.GetProcAddress(hMod, "ms_str");
|
||||
ns_str = (uint)DllTools.GetProcAddress(hMod, "ns_str");
|
||||
ptPid = (uint)DllTools.GetProcAddress(hMod, "tPid");
|
||||
|
||||
nID= (uint)DllTools.GetProcAddress(hMod, "nID");
|
||||
|
||||
Thread threadExit = new Thread(delegate ()
|
||||
{
|
||||
WaitForSingleObject(hThread, 0xFFFFFFFF);
|
||||
@@ -173,6 +188,35 @@ namespace cs2_chs
|
||||
});
|
||||
});
|
||||
threadExit.Start();
|
||||
|
||||
Thread thread3 = new Thread(delegate ()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
|
||||
unsafe
|
||||
{
|
||||
while (*(bool*)pblockRestoreSrc)
|
||||
{
|
||||
// bool aloc = true;
|
||||
//MessageBox.Show("");
|
||||
//WaitOnAddress(pblockRestoreSrc, (uint)&aloc, sizeof(bool), 0xFFFFFFFF);
|
||||
Thread.Sleep(10);
|
||||
}
|
||||
|
||||
char* pms_str = (char*)ms_str;
|
||||
string MsStr = new string(pms_str);
|
||||
this.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate ()
|
||||
{
|
||||
SRC_OUTPUT.Text = MsStr;
|
||||
});
|
||||
}
|
||||
Thread.Sleep(50);
|
||||
}
|
||||
});
|
||||
thread3.Start();
|
||||
// MessageBox.Show("");
|
||||
Advance.threadRestore.Start();
|
||||
}
|
||||
|
||||
private void Grid_MouseUp(object sender, MouseButtonEventArgs e)
|
||||
@@ -187,13 +231,15 @@ namespace cs2_chs
|
||||
Thread thread1 = new Thread(delegate ()
|
||||
{
|
||||
string LocalS = "";
|
||||
string LocalP = "";
|
||||
this.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate ()
|
||||
{
|
||||
LocalS = TEXT_INPUT.Text;
|
||||
LocalP = SRC_OUTPUT.Text;
|
||||
});
|
||||
CreateData(LocalS);
|
||||
CreateData(LocalP, LocalS);
|
||||
});
|
||||
thread1.Start();
|
||||
|
||||
Thread thread2 = new Thread(delegate ()
|
||||
{
|
||||
unsafe
|
||||
@@ -204,6 +250,7 @@ namespace cs2_chs
|
||||
apply.IsEnabled = false;
|
||||
PBS.Visibility = Visibility.Visible;
|
||||
});
|
||||
*saveProcess = 0;
|
||||
while (*saveProcess != 1)
|
||||
{
|
||||
this.Dispatcher.Invoke(DispatcherPriority.Normal, (ThreadStart)delegate ()
|
||||
@@ -221,6 +268,7 @@ namespace cs2_chs
|
||||
}
|
||||
});
|
||||
thread2.Start();
|
||||
thread1.Start();
|
||||
}
|
||||
private void Button_Click_1(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\Advance.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "7023714179C69488DCE97B057C3E8A24BD5443F9A245B9FFE55E6AE4581D23C4"
|
||||
#pragma checksum "..\..\..\Advance.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "14B36F89504AB322533CA92CB6E5863D180B432811F8A590F6262841788C94E3"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
@@ -41,7 +41,7 @@ namespace cs2_chs {
|
||||
public partial class Advance : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 14 "..\..\..\Advance.xaml"
|
||||
#line 15 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox StartUpEdit;
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace cs2_chs {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 22 "..\..\..\Advance.xaml"
|
||||
#line 23 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox AddressEdit;
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace cs2_chs {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 23 "..\..\..\Advance.xaml"
|
||||
#line 24 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.CheckBox EnvioMode;
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace cs2_chs {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 24 "..\..\..\Advance.xaml"
|
||||
#line 25 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.RadioButton OM_GPY;
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace cs2_chs {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 25 "..\..\..\Advance.xaml"
|
||||
#line 26 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.RadioButton OM_TOT;
|
||||
|
||||
@@ -81,13 +81,37 @@ namespace cs2_chs {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 26 "..\..\..\Advance.xaml"
|
||||
#line 27 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox OutPutLog;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 37 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox IDnPut;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 38 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox TRAN_OPT;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 47 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.CheckBox REASE;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
@@ -129,7 +153,7 @@ namespace cs2_chs {
|
||||
case 2:
|
||||
this.StartUpEdit = ((System.Windows.Controls.TextBox)(target));
|
||||
|
||||
#line 14 "..\..\..\Advance.xaml"
|
||||
#line 15 "..\..\..\Advance.xaml"
|
||||
this.StartUpEdit.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.StartUpEdit_TextChanged);
|
||||
|
||||
#line default
|
||||
@@ -137,7 +161,7 @@ namespace cs2_chs {
|
||||
return;
|
||||
case 3:
|
||||
|
||||
#line 16 "..\..\..\Advance.xaml"
|
||||
#line 17 "..\..\..\Advance.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
|
||||
|
||||
#line default
|
||||
@@ -146,7 +170,7 @@ namespace cs2_chs {
|
||||
case 4:
|
||||
this.AddressEdit = ((System.Windows.Controls.TextBox)(target));
|
||||
|
||||
#line 22 "..\..\..\Advance.xaml"
|
||||
#line 23 "..\..\..\Advance.xaml"
|
||||
this.AddressEdit.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.AddressEdit_TextChanged);
|
||||
|
||||
#line default
|
||||
@@ -155,7 +179,7 @@ namespace cs2_chs {
|
||||
case 5:
|
||||
this.EnvioMode = ((System.Windows.Controls.CheckBox)(target));
|
||||
|
||||
#line 23 "..\..\..\Advance.xaml"
|
||||
#line 24 "..\..\..\Advance.xaml"
|
||||
this.EnvioMode.Click += new System.Windows.RoutedEventHandler(this.EnvioMode_Click);
|
||||
|
||||
#line default
|
||||
@@ -164,7 +188,7 @@ namespace cs2_chs {
|
||||
case 6:
|
||||
this.OM_GPY = ((System.Windows.Controls.RadioButton)(target));
|
||||
|
||||
#line 24 "..\..\..\Advance.xaml"
|
||||
#line 25 "..\..\..\Advance.xaml"
|
||||
this.OM_GPY.Checked += new System.Windows.RoutedEventHandler(this.OM_GPY_Checked);
|
||||
|
||||
#line default
|
||||
@@ -173,7 +197,7 @@ namespace cs2_chs {
|
||||
case 7:
|
||||
this.OM_TOT = ((System.Windows.Controls.RadioButton)(target));
|
||||
|
||||
#line 25 "..\..\..\Advance.xaml"
|
||||
#line 26 "..\..\..\Advance.xaml"
|
||||
this.OM_TOT.Checked += new System.Windows.RoutedEventHandler(this.OM_TOT_Checked);
|
||||
|
||||
#line default
|
||||
@@ -182,6 +206,27 @@ namespace cs2_chs {
|
||||
case 8:
|
||||
this.OutPutLog = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 9:
|
||||
this.IDnPut = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 10:
|
||||
this.TRAN_OPT = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 11:
|
||||
this.REASE = ((System.Windows.Controls.CheckBox)(target));
|
||||
|
||||
#line 47 "..\..\..\Advance.xaml"
|
||||
this.REASE.Checked += new System.Windows.RoutedEventHandler(this.CheckBox_Checked);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 47 "..\..\..\Advance.xaml"
|
||||
this.REASE.Unchecked += new System.Windows.RoutedEventHandler(this.REASE_Unchecked);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\Advance.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "7023714179C69488DCE97B057C3E8A24BD5443F9A245B9FFE55E6AE4581D23C4"
|
||||
#pragma checksum "..\..\..\Advance.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "14B36F89504AB322533CA92CB6E5863D180B432811F8A590F6262841788C94E3"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
@@ -41,7 +41,7 @@ namespace cs2_chs {
|
||||
public partial class Advance : System.Windows.Window, System.Windows.Markup.IComponentConnector {
|
||||
|
||||
|
||||
#line 14 "..\..\..\Advance.xaml"
|
||||
#line 15 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox StartUpEdit;
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace cs2_chs {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 22 "..\..\..\Advance.xaml"
|
||||
#line 23 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox AddressEdit;
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace cs2_chs {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 23 "..\..\..\Advance.xaml"
|
||||
#line 24 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.CheckBox EnvioMode;
|
||||
|
||||
@@ -65,7 +65,7 @@ namespace cs2_chs {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 24 "..\..\..\Advance.xaml"
|
||||
#line 25 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.RadioButton OM_GPY;
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace cs2_chs {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 25 "..\..\..\Advance.xaml"
|
||||
#line 26 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.RadioButton OM_TOT;
|
||||
|
||||
@@ -81,13 +81,37 @@ namespace cs2_chs {
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 26 "..\..\..\Advance.xaml"
|
||||
#line 27 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox OutPutLog;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 37 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox IDnPut;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 38 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox TRAN_OPT;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 47 "..\..\..\Advance.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.CheckBox REASE;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
@@ -129,7 +153,7 @@ namespace cs2_chs {
|
||||
case 2:
|
||||
this.StartUpEdit = ((System.Windows.Controls.TextBox)(target));
|
||||
|
||||
#line 14 "..\..\..\Advance.xaml"
|
||||
#line 15 "..\..\..\Advance.xaml"
|
||||
this.StartUpEdit.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.StartUpEdit_TextChanged);
|
||||
|
||||
#line default
|
||||
@@ -137,7 +161,7 @@ namespace cs2_chs {
|
||||
return;
|
||||
case 3:
|
||||
|
||||
#line 16 "..\..\..\Advance.xaml"
|
||||
#line 17 "..\..\..\Advance.xaml"
|
||||
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
|
||||
|
||||
#line default
|
||||
@@ -146,7 +170,7 @@ namespace cs2_chs {
|
||||
case 4:
|
||||
this.AddressEdit = ((System.Windows.Controls.TextBox)(target));
|
||||
|
||||
#line 22 "..\..\..\Advance.xaml"
|
||||
#line 23 "..\..\..\Advance.xaml"
|
||||
this.AddressEdit.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.AddressEdit_TextChanged);
|
||||
|
||||
#line default
|
||||
@@ -155,7 +179,7 @@ namespace cs2_chs {
|
||||
case 5:
|
||||
this.EnvioMode = ((System.Windows.Controls.CheckBox)(target));
|
||||
|
||||
#line 23 "..\..\..\Advance.xaml"
|
||||
#line 24 "..\..\..\Advance.xaml"
|
||||
this.EnvioMode.Click += new System.Windows.RoutedEventHandler(this.EnvioMode_Click);
|
||||
|
||||
#line default
|
||||
@@ -164,7 +188,7 @@ namespace cs2_chs {
|
||||
case 6:
|
||||
this.OM_GPY = ((System.Windows.Controls.RadioButton)(target));
|
||||
|
||||
#line 24 "..\..\..\Advance.xaml"
|
||||
#line 25 "..\..\..\Advance.xaml"
|
||||
this.OM_GPY.Checked += new System.Windows.RoutedEventHandler(this.OM_GPY_Checked);
|
||||
|
||||
#line default
|
||||
@@ -173,7 +197,7 @@ namespace cs2_chs {
|
||||
case 7:
|
||||
this.OM_TOT = ((System.Windows.Controls.RadioButton)(target));
|
||||
|
||||
#line 25 "..\..\..\Advance.xaml"
|
||||
#line 26 "..\..\..\Advance.xaml"
|
||||
this.OM_TOT.Checked += new System.Windows.RoutedEventHandler(this.OM_TOT_Checked);
|
||||
|
||||
#line default
|
||||
@@ -182,6 +206,27 @@ namespace cs2_chs {
|
||||
case 8:
|
||||
this.OutPutLog = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 9:
|
||||
this.IDnPut = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 10:
|
||||
this.TRAN_OPT = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 11:
|
||||
this.REASE = ((System.Windows.Controls.CheckBox)(target));
|
||||
|
||||
#line 47 "..\..\..\Advance.xaml"
|
||||
this.REASE.Checked += new System.Windows.RoutedEventHandler(this.CheckBox_Checked);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 47 "..\..\..\Advance.xaml"
|
||||
this.REASE.Unchecked += new System.Windows.RoutedEventHandler(this.REASE_Unchecked);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
return;
|
||||
}
|
||||
this._contentLoaded = true;
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F004E4358EBAA317663957C95CDCBDC56C5FFAC230C7FE76F16BF31B44EE5CE4"
|
||||
#pragma checksum "..\..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "E730C4B41ACFA459AE58B693C6D867B376E7BBEDF7DBBB52809F64EFDB38EDA1"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
@@ -64,6 +64,14 @@ namespace cs2_chs {
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 49 "..\..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox SRC_OUTPUT;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
@@ -144,14 +152,17 @@ namespace cs2_chs {
|
||||
#line hidden
|
||||
return;
|
||||
case 6:
|
||||
this.SRC_OUTPUT = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 7:
|
||||
|
||||
#line 58 "..\..\..\MainWindow.xaml"
|
||||
#line 73 "..\..\..\MainWindow.xaml"
|
||||
((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CommandBinding_ShowMainWindow_CanExecute);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 59 "..\..\..\MainWindow.xaml"
|
||||
#line 74 "..\..\..\MainWindow.xaml"
|
||||
((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_ShowMainWindow_Executed);
|
||||
|
||||
#line default
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma checksum "..\..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "F004E4358EBAA317663957C95CDCBDC56C5FFAC230C7FE76F16BF31B44EE5CE4"
|
||||
#pragma checksum "..\..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "E730C4B41ACFA459AE58B693C6D867B376E7BBEDF7DBBB52809F64EFDB38EDA1"
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
@@ -64,6 +64,14 @@ namespace cs2_chs {
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
|
||||
#line 49 "..\..\..\MainWindow.xaml"
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
|
||||
internal System.Windows.Controls.TextBox SRC_OUTPUT;
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
private bool _contentLoaded;
|
||||
|
||||
/// <summary>
|
||||
@@ -144,14 +152,17 @@ namespace cs2_chs {
|
||||
#line hidden
|
||||
return;
|
||||
case 6:
|
||||
this.SRC_OUTPUT = ((System.Windows.Controls.TextBox)(target));
|
||||
return;
|
||||
case 7:
|
||||
|
||||
#line 58 "..\..\..\MainWindow.xaml"
|
||||
#line 73 "..\..\..\MainWindow.xaml"
|
||||
((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CommandBinding_ShowMainWindow_CanExecute);
|
||||
|
||||
#line default
|
||||
#line hidden
|
||||
|
||||
#line 59 "..\..\..\MainWindow.xaml"
|
||||
#line 74 "..\..\..\MainWindow.xaml"
|
||||
((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CommandBinding_ShowMainWindow_Executed);
|
||||
|
||||
#line default
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -198,11 +198,11 @@ DWORD WINAPI fGetGlyphOutlineW(
|
||||
if(lstrlenW(ns_str)>=5999)
|
||||
ns_str[0] = L'\0';
|
||||
lstrcatW(ns_str, loca.c_str());
|
||||
return pGetGlyphOutlineW(hdc, L'A', fuFormat, lpgm, cjBuffer, pvBuffer, lpmat2);
|
||||
return pGetGlyphOutlineW(hdc, L' ', fuFormat, lpgm, cjBuffer, pvBuffer, lpmat2);
|
||||
}
|
||||
BOOL WINAPI fTextOutW(_In_ HDC hdc, _In_ int x, _In_ int y, _In_reads_(c) LPCWSTR lpString, _In_ int c)
|
||||
{
|
||||
return pTextOutW(hdc, x, y, L"A", c);
|
||||
return pTextOutW(hdc, x, y, L"\0", c);
|
||||
}
|
||||
void start()
|
||||
{
|
||||
|
||||
@@ -7,117 +7,221 @@ extern HMODULE hMod;
|
||||
extern "C" extern DLLAPI wchar_t ms_str[3096];
|
||||
extern "C" extern DLLAPI int nID;
|
||||
extern "C" extern DLLAPI DWORD tPid;
|
||||
DWORD CreateDataExportEx(LPCWSTR data)
|
||||
extern "C" extern DLLAPI bool blockRestoreSrc;
|
||||
struct ExportParam {
|
||||
WCHAR data[1024];
|
||||
WCHAR src[1024];
|
||||
};
|
||||
DWORD CreateDataExportEx(LPVOID data)
|
||||
{
|
||||
// MessageBoxW(0, data,L"",0);
|
||||
WCHAR sjp[3096];
|
||||
WCHAR scn[3096];
|
||||
int lasger = GEtLargestID();
|
||||
if (nID == 0) {
|
||||
MessageBox(0, L"the ID value seems not available,therefore this action has been refused", L"error", MB_ICONERROR);
|
||||
saveProcess = 1.0;
|
||||
return 1;
|
||||
}
|
||||
if (nID - lasger > 2) {
|
||||
MessageBox(0, L"the ID value seems not available,therefore this action has been refused", L"error", MB_ICONERROR);
|
||||
saveProcess = 1.0;
|
||||
return 1;
|
||||
}
|
||||
if (!GetDataByID(nID - 1, sjp, scn)) {
|
||||
CreateDataByID(nID - 1, ms_str, 2 * (lstrlenW(ms_str) + 1), data, 2 * (lstrlenW(data) + 1));
|
||||
WCHAR abv[16];
|
||||
_itow_s(nID - 1, abv, 10);
|
||||
wstring str;
|
||||
str += L"Apply ID:";
|
||||
str += abv;
|
||||
str += L"\n";
|
||||
str += ms_str;
|
||||
str += L"->";
|
||||
str += data;
|
||||
MessageBoxW(NULL, str.c_str(), L"successed to add rule", MB_ICONINFORMATION);
|
||||
saveProcess = 1.0;
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
wstring nString = L"This rule is already exist,do you want still to replace it?(according to your PC,it may take you a short time)\n";
|
||||
WCHAR abv[16];
|
||||
_itow_s(nID - 1, abv, 10);
|
||||
nString += L"ID:";
|
||||
nString += abv;
|
||||
nString += L"\n";
|
||||
nString += sjp;
|
||||
saveProcess = 0.0;
|
||||
int result = MessageBoxW(NULL, nString.c_str(), L"information", MB_ICONINFORMATION | MB_OKCANCEL);
|
||||
if (result != IDOK) {
|
||||
|
||||
ExportParam* bData = (ExportParam*)data;
|
||||
if (!blockRestoreSrc) {
|
||||
// MessageBoxW(0, data,L"",0);
|
||||
WCHAR sjp[3096];
|
||||
WCHAR scn[3096];
|
||||
int lasger = GEtLargestID();
|
||||
if (nID == 0) {
|
||||
MessageBox(0, L"the ID value seems not available,therefore this action has been refused", L"error", MB_ICONERROR);
|
||||
saveProcess = 1.0;
|
||||
return 1;
|
||||
}
|
||||
int p = 0;
|
||||
MicroData *_Index=new MicroData(L"~Index.ax", sizeof(IndexData));
|
||||
MicroBinary* _Data = new MicroBinary(L"~Data.ax");
|
||||
IndexData createData;
|
||||
while (GetDataByID(p, sjp, scn)) {
|
||||
if (p == (nID - 1)) {
|
||||
createData.Id = p;
|
||||
createData.JpLength = 2 * (lstrlenW(sjp) + 1);
|
||||
createData.CnLength = 2 * (lstrlenW(data) + 1);
|
||||
createData.JpBass = _Data->Size();
|
||||
_Data->Push(sjp, 2 * (lstrlenW(sjp) + 1));
|
||||
createData.CnBass = _Data->Size();
|
||||
_Data->Push(data, 2 * (lstrlenW(data) + 1));
|
||||
_Index->Push(&createData);
|
||||
_Index->Save();
|
||||
_Data->Save();
|
||||
}
|
||||
else
|
||||
{
|
||||
createData.Id = p;
|
||||
createData.JpLength = 2 * (lstrlenW(sjp) + 1);
|
||||
createData.CnLength = 2 * (lstrlenW(scn) + 1);
|
||||
createData.JpBass = _Data->Size();
|
||||
_Data->Push(sjp, 2 * (lstrlenW(sjp) + 1));
|
||||
createData.CnBass = _Data->Size();
|
||||
_Data->Push(scn, 2 * (lstrlenW(scn) + 1));
|
||||
_Index->Push(&createData);
|
||||
_Index->Save();
|
||||
_Data->Save();
|
||||
}
|
||||
saveProcess = (double)p / (double)(lasger);
|
||||
p++;
|
||||
if (nID - lasger > 2) {
|
||||
MessageBox(0, L"the ID value seems not available,therefore this action has been refused", L"error", MB_ICONERROR);
|
||||
saveProcess = 1.0;
|
||||
return 1;
|
||||
}
|
||||
if (!GetDataByID(nID - 1, sjp, scn)) {
|
||||
CreateDataByID(nID - 1, bData->src, 2 * (lstrlenW(bData->src) + 1), bData->data, 2 * (lstrlenW(bData->data) + 1));
|
||||
WCHAR abv[16];
|
||||
_itow_s(nID - 1, abv, 10);
|
||||
wstring str;
|
||||
str += L"Apply ID:";
|
||||
str += abv;
|
||||
str += L"\n";
|
||||
str += bData->src;
|
||||
str += L"->";
|
||||
str += bData->data;
|
||||
MessageBoxW(NULL, str.c_str(), L"successed to add rule", MB_ICONINFORMATION);
|
||||
saveProcess = 1.0;
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
wstring nString = L"This rule is already exist,do you want still to replace it?(according to your PC,it may take you a short time)\n";
|
||||
WCHAR abv[16];
|
||||
_itow_s(nID - 1, abv, 10);
|
||||
nString += L"ID:";
|
||||
nString += abv;
|
||||
nString += L"\n";
|
||||
nString += sjp;
|
||||
saveProcess = 0.0;
|
||||
int result = MessageBoxW(NULL, nString.c_str(), L"information", MB_ICONINFORMATION | MB_OKCANCEL);
|
||||
if (result != IDOK) {
|
||||
saveProcess = 1.0;
|
||||
return 1;
|
||||
}
|
||||
int p = 0;
|
||||
MicroData* _Index = new MicroData(L"~Index.ax", sizeof(IndexData));
|
||||
MicroBinary* _Data = new MicroBinary(L"~Data.ax");
|
||||
IndexData createData;
|
||||
while (GetDataByID(p, sjp, scn)) {
|
||||
if (p == (nID - 1)) {
|
||||
createData.Id = p;
|
||||
createData.JpLength = 2 * (lstrlenW(sjp) + 1);
|
||||
createData.CnLength = 2 * (lstrlenW(bData->data) + 1);
|
||||
createData.JpBass = _Data->Size();
|
||||
_Data->Push(sjp, 2 * (lstrlenW(sjp) + 1));
|
||||
createData.CnBass = _Data->Size();
|
||||
_Data->Push(bData->data, 2 * (lstrlenW(bData->data) + 1));
|
||||
_Index->Push(&createData);
|
||||
_Index->Save();
|
||||
_Data->Save();
|
||||
}
|
||||
else
|
||||
{
|
||||
createData.Id = p;
|
||||
createData.JpLength = 2 * (lstrlenW(sjp) + 1);
|
||||
createData.CnLength = 2 * (lstrlenW(scn) + 1);
|
||||
createData.JpBass = _Data->Size();
|
||||
_Data->Push(sjp, 2 * (lstrlenW(sjp) + 1));
|
||||
createData.CnBass = _Data->Size();
|
||||
_Data->Push(scn, 2 * (lstrlenW(scn) + 1));
|
||||
_Index->Push(&createData);
|
||||
_Index->Save();
|
||||
_Data->Save();
|
||||
}
|
||||
saveProcess = (double)p / (double)(lasger);
|
||||
p++;
|
||||
}
|
||||
|
||||
delete _Index;
|
||||
delete _Data;
|
||||
delete Index;
|
||||
delete ::Data;
|
||||
// saveProcess = 0.0;
|
||||
saveProcess = 1;
|
||||
DeleteFile(L"Data.ax");
|
||||
DeleteFile(L"Index.ax");
|
||||
rename("~Data.ax", "Data.ax");
|
||||
rename("~Index.ax", "Index.ax");
|
||||
Index = new MicroData(L"Index.ax", sizeof(IndexData));
|
||||
::Data = new MicroBinary(L"Data.ax");
|
||||
Index->Load();
|
||||
::Data->Load();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
WCHAR sjp[3096];
|
||||
WCHAR scn[3096];
|
||||
int lasger = GEtLargestID();
|
||||
int jkID;
|
||||
|
||||
if (!GetDataByJP(&jkID, bData->src, scn)) {
|
||||
CreateDataByID(lasger + 1, bData->src, 2 * (lstrlenW(bData->src) + 1), bData->data, 2 * (lstrlenW(bData->data) + 1));
|
||||
WCHAR abv[16];
|
||||
_itow_s(lasger + 1, abv, 10);
|
||||
wstring str;
|
||||
str += L"Apply ID:";
|
||||
str += abv;
|
||||
str += L"\n";
|
||||
str += bData->src;
|
||||
str += L"->";
|
||||
str += bData->data;
|
||||
MessageBoxW(NULL, str.c_str(), L"successed to add rule", MB_ICONINFORMATION);
|
||||
saveProcess = 1.0;
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
wstring nString = L"This rule is already exist,do you want still to replace it?(according to your PC,it may take you a short time)\n";
|
||||
WCHAR abv[16];
|
||||
_itow_s(jkID, abv, 10);
|
||||
nString += L"ID:";
|
||||
nString += abv;
|
||||
nString += L"\n";
|
||||
nString += bData->src;
|
||||
|
||||
int result = MessageBoxW(NULL, nString.c_str(), L"information", MB_ICONINFORMATION | MB_OKCANCEL);
|
||||
if (result != IDOK) {
|
||||
saveProcess = 1.0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int p = 0;
|
||||
MicroData* _Index = new MicroData(L"~Index.ax", sizeof(IndexData));
|
||||
MicroBinary* _Data = new MicroBinary(L"~Data.ax");
|
||||
IndexData createData;
|
||||
while (GetDataByID(p, sjp, scn)) {
|
||||
if (p == jkID) {
|
||||
createData.Id = p;
|
||||
createData.JpLength = 2 * (lstrlenW(sjp) + 1);
|
||||
createData.CnLength = 2 * (lstrlenW(bData->data) + 1);
|
||||
createData.JpBass = _Data->Size();
|
||||
_Data->Push(sjp, 2 * (lstrlenW(sjp) + 1));
|
||||
createData.CnBass = _Data->Size();
|
||||
_Data->Push(bData->data, 2 * (lstrlenW(bData->data) + 1));
|
||||
_Index->Push(&createData);
|
||||
_Index->Save();
|
||||
_Data->Save();
|
||||
}
|
||||
else
|
||||
{
|
||||
createData.Id = p;
|
||||
createData.JpLength = 2 * (lstrlenW(sjp) + 1);
|
||||
createData.CnLength = 2 * (lstrlenW(scn) + 1);
|
||||
createData.JpBass = _Data->Size();
|
||||
_Data->Push(sjp, 2 * (lstrlenW(sjp) + 1));
|
||||
createData.CnBass = _Data->Size();
|
||||
_Data->Push(scn, 2 * (lstrlenW(scn) + 1));
|
||||
_Index->Push(&createData);
|
||||
_Index->Save();
|
||||
_Data->Save();
|
||||
}
|
||||
saveProcess = (double)p / (double)(lasger);
|
||||
p++;
|
||||
}
|
||||
|
||||
delete _Index;
|
||||
delete _Data;
|
||||
delete Index;
|
||||
delete ::Data;
|
||||
// saveProcess = 0.0;
|
||||
saveProcess = 1;
|
||||
DeleteFile(L"Data.ax");
|
||||
DeleteFile(L"Index.ax");
|
||||
rename("~Data.ax", "Data.ax");
|
||||
rename("~Index.ax", "Index.ax");
|
||||
Index = new MicroData(L"Index.ax", sizeof(IndexData));
|
||||
::Data = new MicroBinary(L"Data.ax");
|
||||
Index->Load();
|
||||
::Data->Load();
|
||||
return 1;
|
||||
}
|
||||
|
||||
delete _Index;
|
||||
delete _Data;
|
||||
delete Index;
|
||||
delete Data;
|
||||
// saveProcess = 0.0;
|
||||
saveProcess = 1;
|
||||
DeleteFile(L"Data.ax");
|
||||
DeleteFile(L"Index.ax");
|
||||
rename("~Data.ax", "Data.ax");
|
||||
rename("~Index.ax", "Index.ax");
|
||||
Index = new MicroData(L"Index.ax", sizeof(IndexData));
|
||||
Data = new MicroBinary(L"Data.ax");
|
||||
Index->Load();
|
||||
Data->Load();
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
void CreateDataExport(WCHAR data[])
|
||||
void CreateDataExport(WCHAR src[],WCHAR data[])
|
||||
{
|
||||
ExportParam alc;
|
||||
lstrcpyW(alc.data, data);
|
||||
lstrcpyW(alc.src, src);
|
||||
|
||||
DWORD dwOld;
|
||||
HANDLE hTr = OpenProcess(PROCESS_ALL_ACCESS, FALSE, tPid);
|
||||
if (!hTr)
|
||||
MessageBoxA(0,"","",0);
|
||||
LPWSTR PszLibFileRemote = (LPWSTR)VirtualAllocEx(hTr, NULL, 2*(lstrlenW(data)+1), MEM_COMMIT, PAGE_READWRITE);
|
||||
if (!PszLibFileRemote)
|
||||
MessageBoxA(0, "", "", 0);
|
||||
WriteProcessMemory(hTr, PszLibFileRemote, data, 2 * (lstrlenW(data) + 1), &dwOld);
|
||||
|
||||
|
||||
|
||||
BYTE* PszLibFileRemote = (PBYTE)VirtualAllocEx(hTr, NULL, sizeof(ExportParam), MEM_COMMIT, PAGE_READWRITE);
|
||||
|
||||
|
||||
WriteProcessMemory(hTr, PszLibFileRemote, &alc, sizeof(ExportParam), &dwOld);
|
||||
|
||||
HANDLE hHookStart = CreateRemoteThread(hTr, NULL, 0, (LPTHREAD_START_ROUTINE)
|
||||
::GetProcAddress(hMod, "CreateDataExportEx"), PszLibFileRemote, 0, NULL);
|
||||
if (!hHookStart)
|
||||
MessageBoxA(0, "", "", 0);
|
||||
WaitForSingleObject(hHookStart, INFINITE);
|
||||
VirtualFreeEx(hTr, PszLibFileRemote, sizeof(ExportParam), MEM_RELEASE);
|
||||
CloseHandle(hTr);
|
||||
}
|
||||
BOOL CreateDataByID(int ID, LPCWSTR jpBuff, int ljp, LPCWSTR cnBuffer, int lcn)
|
||||
{
|
||||
@@ -156,6 +260,7 @@ BOOL GetDataByJP(int* ID, LPCWSTR jpBuff, LPWSTR cnBuffer)
|
||||
if ((*Index)++)
|
||||
continue;
|
||||
else {
|
||||
*ID = index.Id;
|
||||
(*Data) = 0;
|
||||
(*Index) = 0;
|
||||
return 0;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#pragma once
|
||||
#include <Windows.h>
|
||||
#define DLLAPI __declspec(dllexport)
|
||||
extern "C" DLLAPI void CreateDataExport(WCHAR data[]);
|
||||
extern "C" DLLAPI void CreateDataExport(WCHAR scr[],WCHAR data[]);
|
||||
BOOL CreateDataByID(int ID, LPCWSTR jpBuff, int ljp, LPCWSTR cnBuffer, int lcn);
|
||||
BOOL GetDataByJP(int* ID, LPCWSTR jpBuff, LPWSTR cnBuffer);
|
||||
BOOL GetDataByID(int ID, LPWSTR jpBuff, LPWSTR cnBuffer);
|
||||
int GEtLargestID();
|
||||
extern "C" DLLAPI DWORD CreateDataExportEx(LPCWSTR path);
|
||||
extern "C" DLLAPI DWORD CreateDataExportEx(LPVOID path);
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,9 +1,8 @@
|
||||
BuildIn.cpp
|
||||
dllmain.cpp
|
||||
正在创建库 D:\VSProject\cs2\cs2_united\Release\cs2_patch.lib 和对象 D:\VSProject\cs2\cs2_united\Release\cs2_patch.exp
|
||||
正在生成代码
|
||||
79 of 129 functions (61.2%) were compiled, the rest were copied from previous compilation.
|
||||
1 of 129 functions ( 0.8%) were compiled, the rest were copied from previous compilation.
|
||||
0 functions were new in current compilation
|
||||
6 functions had inline decision re-evaluated but remain unchanged
|
||||
2 functions had inline decision re-evaluated but remain unchanged
|
||||
已完成代码的生成
|
||||
cs2_patch.vcxproj -> D:\VSProject\cs2\cs2_united\Release\cs2_patch.dll
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -12,6 +12,8 @@ extern "C" DLLAPI int nID = 0;
|
||||
extern "C" DLLAPI DWORD tPid = 0;
|
||||
extern "C" DLLAPI DWORD m_Addr = 0xFFFFFFFF;
|
||||
extern "C" DLLAPI DWORD VioMode = 0;
|
||||
|
||||
extern "C" DLLAPI bool blockRestoreSrc = false;
|
||||
#pragma data_seg()
|
||||
#pragma comment(linker, "/section:PublicData,rws")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user