Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var createKey = RegistryKey.CurrentUser.Create("Software\{Company}\{Product}");
- createKey.SetValue("KeyName1", text1);
- createKey.SetValue("KeyName2", text2);
- createKey.Close();
- DMSOPME.DLL!PMEMFJ.Register.btnRegister_Click(object sender = {Text = "Register"}, System.EventArgs e = {System.EventArgs}) Line 108 C#
- System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventArgs e) + 0x70 bytes
- System.Windows.Forms.dll!System.Windows.Forms.Button.OnClick(System.EventArgs e) + 0x4a bytes
- System.Windows.Forms.dll!System.Windows.Forms.Button.PerformClick() + 0x5b bytes
- System.Windows.Forms.dll!System.Windows.Forms.Form.ProcessDialogKey(System.Windows.Forms.Keys keyData) + 0x8e bytes
- System.Windows.Forms.dll!System.Windows.Forms.Control.ProcessDialogKey(System.Windows.Forms.Keys keyData) + 0x16 bytes
- System.Windows.Forms.dll!System.Windows.Forms.TextBoxBase.ProcessDialogKey(System.Windows.Forms.Keys keyData) + 0x37 bytes
- System.Windows.Forms.dll!System.Windows.Forms.Control.PreProcessMessage(ref System.Windows.Forms.Message msg) + 0xe2 bytes
- System.Windows.Forms.dll!System.Windows.Forms.Control.PreProcessControlMessageInternal(System.Windows.Forms.Control target = {Text = "generic@{Company Name}.com"}, ref System.Windows.Forms.Message msg = {msg=0x100 (WM_KEYDOWN) hwnd=0x240a84 wparam=0xd lparam=0x1c0001 result=0x0}) + 0x101 bytes
- System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(ref System.Windows.Forms.NativeMethods.MSG msg = {System.Windows.Forms.NativeMethods.MSG}) + 0x198 bytes
- System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.LocalModalMessageLoop(System.Windows.Forms.Form form = {PMEMFJ.Register, Text: Register {Product}}) + 0x137 bytes
- System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(int reason = 4, System.Windows.Forms.ApplicationContext context = {System.Windows.Forms.Application.ModalApplicationContext}) + 0x1e8 bytes
- System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) + 0x61 bytes
- System.Windows.Forms.dll!System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form form) + 0x33 bytes
- System.Windows.Forms.dll!System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window owner) + 0x373 bytes
- DMSOPME.DLL!PMEMFJ.ThisAddIn.btnRegister() Line 533 + 0x33 bytes C#
- DMSOPME.DLL!PMEMFJ.Ribbon1.btnRegister_Click(object sender = {Microsoft.Office.Tools.Ribbon.RibbonButton}, Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs e = {Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs}) Line 190 C#
- Microsoft.Office.Tools.Common.v9.0.dll!Microsoft.Office.Tools.Ribbon.RibbonPropertyStorage.ControlActionRaise(Microsoft.Office.Core.IRibbonControl control) + 0x5d bytes
- Microsoft.Office.Tools.Common.v9.0.dll!Microsoft.Office.Tools.Ribbon.RibbonPropertyStorage.ButtonClickCallback(Microsoft.Office.Tools.Ribbon.RibbonComponent component, object[] args) + 0x34 bytes
- Microsoft.Office.Tools.Common.v9.0.dll!Microsoft.Office.Tools.Ribbon.RibbonManager.Invoke(Microsoft.Office.Tools.Ribbon.RibbonComponentCallback callback, object[] args) + 0x72 bytes
- Microsoft.Office.Tools.Common.v9.0.dll!Microsoft.Office.Tools.Ribbon.RibbonMethodInfo.Invoke(object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object[] parameters, System.Globalization.CultureInfo culture) + 0x14 bytes
- Microsoft.Office.Tools.Common.v9.0.dll!Microsoft.Office.Tools.Ribbon.RibbonManager.System.Reflection.IReflect.InvokeMember(string name, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, object target, object[] args, System.Reflection.ParameterModifier[] modifiers, System.Globalization.CultureInfo culture, string[] namedParameters) + 0x56 bytes
- [Frames below may be incorrect and/or missing, no symbols loaded for mscorwks.dll]
- [Appdomain Transition]
- MSO.DLL!326073cf()
- MSO.DLL!32754c9b()
- MSO.DLL!32889220()
- MSO.DLL!3288911d()
- MSO.DLL!32ef2845()
- MSO.DLL!32eeb3e3()
- MSO.DLL!3275f49c()
- MSO.DLL!328463d8()
- MSO.DLL!327e583c()
- MSO.DLL!327bfd83()
- MSO.DLL!32832a72()
- MSO.DLL!3279cbdd()
- MSO.DLL!32683205()
- MSO.DLL!326a3104()
- MSO.DLL!32773a66()
- MSO.DLL!326c9de7()
- MSO.DLL!3278f902()
- MSO.DLL!3265f53e()
- MSO.DLL!326c8e37()
- MSO.DLL!326c38cd()
- user32.dll!7e418734()
- user32.dll!7e418816()
- user32.dll!7e4189cd()
- user32.dll!7e418a10()
- EXCEL.EXE!30028fec()
- EXCEL.EXE!30028f9f()
- EXCEL.EXE!30028cff()
- MSO.DLL!326054c3()
- EXCEL.EXE!30003b60()
- msvcr80.dll!78132c78()
- msvcr80.dll!78132e24()
- msvcr80.dll!78132e2f()
- msvcr80.dll!78137021()
- msvcr80.dll!781370a0()
- msvcr80.dll!7813725c()
- EXCEL.EXE!30003874()
- kernel32.dll!7c81776f()
- private void btnRegister_Click(object sender, EventArgs e)
- {
- try
- {
- WebService.Service1 dws = new Service1();
- Cursor.Current = Cursors.WaitCursor;
- string staString3 = "";
- if (btnRegister.Text == "Register")
- {
- if (textbox1.Text == "")
- {
- Cursor.Current = Cursors.Default;
- MessageBox.Show("Textbox1 is a required field. Please enter a valid value for Textbox1");
- textbox1.Focus();
- return;
- }
- else if (textbox2.Text == "")
- {
- Cursor.Current = Cursors.Default;
- MessageBox.Show("Textbox2 is a required field. Please enter a valid value for Textbox2");
- textbox2.Focus();
- return;
- }
- else
- {
- initRegKey(textbox1.Text, textbox2.Text);
- if (dws.Method1(textbox1.Text, staString3, textbox2.Text))
- {
- Cursor.Current = Cursors.Default;
- if (MessageBox.Show("You have successfully registered your copy of {Product}." + Environment.NewLine + "Do you want to be sent the activation key again via e-mail?", "Registration {Product}", MessageBoxButtons.YesNo) == DialogResult.Yes)
- {
- dws.Method3(textbox1.Text, staString3, textbox2.Text);
- MessageBox.Show("Activation Code Sent!");
- }
- txtKey.Visible = true;
- label4.Visible = true;
- txtKey.Focus();
- btnRegister.Text = "Activate";
- }
- else
- {
- string OV = "";
- string OB = "";
- string[] installInfo = { OV, OB, Environment.OSVersion.VersionString, Environment.MachineName };
- if (dws.Method2(textbox1.Text, staString3, textbox2.Text, installInfo))
- {
- txtKey.Focus();
- Cursor.Current = Cursors.Default;
- MessageBox.Show("You have successfully registered your copy of {Product}." + Environment.NewLine + "Your activation key will arrive in your e-mail's Inbox or Spam Folder shortly.");
- txtKey.Visible = true;
- label4.Visible = true;
- txtKey.Focus();
- btnRegister.Text = "Activate";
- }
- else if (dws.Method4(textbox1.Text, textbox2.Text) > 0)
- {
- this.Hide();
- GlobalsVar.errornum = 3;
- ErrorMessage frm = new ErrorMessage();
- if (frm.ShowDialog(NativeWindow.FromHandle(Handle)) == DialogResult.Cancel)
- {
- IntPtr ip = new IntPtr(Globals.ThisAddIn.Application.Hwnd);
- Show(NativeWindow.FromHandle(ip));
- }
- }
- else
- {
- Hide();
- GlobalsVar.errornum = 1;
- ErrorMessage frm = new ErrorMessage();
- if (frm.ShowDialog(NativeWindow.FromHandle(Handle)) == DialogResult.Cancel)
- {
- IntPtr ip = new IntPtr(Globals.ThisAddIn.Application.Hwnd);
- Show(NativeWindow.FromHandle(ip));
- }
- }
- }
- }
- }
- else
- {
- textbox1.Enabled = !dws.Method5(textbox1.Text, staString3, txtKey.Text);
- textbox2.Enabled = !dws.Method5(textbox1.Text, staString3, txtKey.Text);
- txtKey.Enabled = !dws.Method5(textbox1.Text, staString3, txtKey.Text);
- if (dws.Method5(textbox1.Text, staString3, txtKey.Text))
- {
- if (writeRegKeys(txtKey.Text, txtOrderID.Text, txtEmail.Text, GetProcIDMan(), 1, 1, 1, 1, 2, 1, DateTime.Today.Date, AssemblyVersion, 1, "http://{Company Name}/{Product}/"))
- {
- this.Close();
- }
- else
- {
- Hide();
- GlobalsVar.errornum = 4;
- ErrorMessage frm = new ErrorMessage();
- if (frm.ShowDialog(NativeWindow.FromHandle(Handle)) == DialogResult.Cancel)
- {
- IntPtr ip = new IntPtr(Globals.ThisAddIn.Application.Hwnd);
- Show(NativeWindow.FromHandle(ip));
- }
- }
- }
- else
- {
- Hide();
- GlobalsVar.errornum = 2;
- ErrorMessage frm = new ErrorMessage();
- if (frm.ShowDialog(NativeWindow.FromHandle(Handle)) == DialogResult.Cancel)
- {
- IntPtr ip = new IntPtr(Globals.ThisAddIn.Application.Hwnd);
- Show(NativeWindow.FromHandle(ip));
- }
- }
- ThisAddIn.Method0();
- }
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.ToString());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement