Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.24 KB | None | 0 0
  1. var createKey = RegistryKey.CurrentUser.Create("Software\{Company}\{Product}");
  2. createKey.SetValue("KeyName1", text1);
  3. createKey.SetValue("KeyName2", text2);
  4. createKey.Close();
  5.  
  6. DMSOPME.DLL!PMEMFJ.Register.btnRegister_Click(object sender = {Text = "Register"}, System.EventArgs e = {System.EventArgs}) Line 108 C#
  7. System.Windows.Forms.dll!System.Windows.Forms.Control.OnClick(System.EventArgs e) + 0x70 bytes
  8. System.Windows.Forms.dll!System.Windows.Forms.Button.OnClick(System.EventArgs e) + 0x4a bytes
  9. System.Windows.Forms.dll!System.Windows.Forms.Button.PerformClick() + 0x5b bytes
  10. System.Windows.Forms.dll!System.Windows.Forms.Form.ProcessDialogKey(System.Windows.Forms.Keys keyData) + 0x8e bytes
  11. System.Windows.Forms.dll!System.Windows.Forms.Control.ProcessDialogKey(System.Windows.Forms.Keys keyData) + 0x16 bytes
  12. System.Windows.Forms.dll!System.Windows.Forms.TextBoxBase.ProcessDialogKey(System.Windows.Forms.Keys keyData) + 0x37 bytes
  13. System.Windows.Forms.dll!System.Windows.Forms.Control.PreProcessMessage(ref System.Windows.Forms.Message msg) + 0xe2 bytes
  14. 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
  15. System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(ref System.Windows.Forms.NativeMethods.MSG msg = {System.Windows.Forms.NativeMethods.MSG}) + 0x198 bytes
  16. System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.LocalModalMessageLoop(System.Windows.Forms.Form form = {PMEMFJ.Register, Text: Register {Product}}) + 0x137 bytes
  17. 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
  18. System.Windows.Forms.dll!System.Windows.Forms.Application.ThreadContext.RunMessageLoop(int reason, System.Windows.Forms.ApplicationContext context) + 0x61 bytes
  19. System.Windows.Forms.dll!System.Windows.Forms.Application.RunDialog(System.Windows.Forms.Form form) + 0x33 bytes
  20. System.Windows.Forms.dll!System.Windows.Forms.Form.ShowDialog(System.Windows.Forms.IWin32Window owner) + 0x373 bytes
  21. DMSOPME.DLL!PMEMFJ.ThisAddIn.btnRegister() Line 533 + 0x33 bytes C#
  22. 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#
  23. Microsoft.Office.Tools.Common.v9.0.dll!Microsoft.Office.Tools.Ribbon.RibbonPropertyStorage.ControlActionRaise(Microsoft.Office.Core.IRibbonControl control) + 0x5d bytes
  24. Microsoft.Office.Tools.Common.v9.0.dll!Microsoft.Office.Tools.Ribbon.RibbonPropertyStorage.ButtonClickCallback(Microsoft.Office.Tools.Ribbon.RibbonComponent component, object[] args) + 0x34 bytes
  25. Microsoft.Office.Tools.Common.v9.0.dll!Microsoft.Office.Tools.Ribbon.RibbonManager.Invoke(Microsoft.Office.Tools.Ribbon.RibbonComponentCallback callback, object[] args) + 0x72 bytes
  26. 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
  27. 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
  28. [Frames below may be incorrect and/or missing, no symbols loaded for mscorwks.dll]
  29. [Appdomain Transition]
  30. MSO.DLL!326073cf()
  31. MSO.DLL!32754c9b()
  32. MSO.DLL!32889220()
  33. MSO.DLL!3288911d()
  34. MSO.DLL!32ef2845()
  35. MSO.DLL!32eeb3e3()
  36. MSO.DLL!3275f49c()
  37. MSO.DLL!328463d8()
  38. MSO.DLL!327e583c()
  39. MSO.DLL!327bfd83()
  40. MSO.DLL!32832a72()
  41. MSO.DLL!3279cbdd()
  42. MSO.DLL!32683205()
  43. MSO.DLL!326a3104()
  44. MSO.DLL!32773a66()
  45. MSO.DLL!326c9de7()
  46. MSO.DLL!3278f902()
  47. MSO.DLL!3265f53e()
  48. MSO.DLL!326c8e37()
  49. MSO.DLL!326c38cd()
  50. user32.dll!7e418734()
  51. user32.dll!7e418816()
  52. user32.dll!7e4189cd()
  53. user32.dll!7e418a10()
  54. EXCEL.EXE!30028fec()
  55. EXCEL.EXE!30028f9f()
  56. EXCEL.EXE!30028cff()
  57. MSO.DLL!326054c3()
  58. EXCEL.EXE!30003b60()
  59. msvcr80.dll!78132c78()
  60. msvcr80.dll!78132e24()
  61. msvcr80.dll!78132e2f()
  62. msvcr80.dll!78137021()
  63. msvcr80.dll!781370a0()
  64. msvcr80.dll!7813725c()
  65. EXCEL.EXE!30003874()
  66. kernel32.dll!7c81776f()
  67.  
  68. private void btnRegister_Click(object sender, EventArgs e)
  69. {
  70. try
  71. {
  72. WebService.Service1 dws = new Service1();
  73. Cursor.Current = Cursors.WaitCursor;
  74. string staString3 = "";
  75. if (btnRegister.Text == "Register")
  76. {
  77. if (textbox1.Text == "")
  78. {
  79. Cursor.Current = Cursors.Default;
  80. MessageBox.Show("Textbox1 is a required field. Please enter a valid value for Textbox1");
  81. textbox1.Focus();
  82. return;
  83. }
  84. else if (textbox2.Text == "")
  85. {
  86. Cursor.Current = Cursors.Default;
  87. MessageBox.Show("Textbox2 is a required field. Please enter a valid value for Textbox2");
  88. textbox2.Focus();
  89. return;
  90. }
  91. else
  92. {
  93. initRegKey(textbox1.Text, textbox2.Text);
  94. if (dws.Method1(textbox1.Text, staString3, textbox2.Text))
  95. {
  96. Cursor.Current = Cursors.Default;
  97. 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)
  98. {
  99. dws.Method3(textbox1.Text, staString3, textbox2.Text);
  100. MessageBox.Show("Activation Code Sent!");
  101. }
  102. txtKey.Visible = true;
  103. label4.Visible = true;
  104. txtKey.Focus();
  105. btnRegister.Text = "Activate";
  106. }
  107. else
  108. {
  109. string OV = "";
  110. string OB = "";
  111. string[] installInfo = { OV, OB, Environment.OSVersion.VersionString, Environment.MachineName };
  112. if (dws.Method2(textbox1.Text, staString3, textbox2.Text, installInfo))
  113. {
  114. txtKey.Focus();
  115. Cursor.Current = Cursors.Default;
  116. 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.");
  117. txtKey.Visible = true;
  118. label4.Visible = true;
  119. txtKey.Focus();
  120. btnRegister.Text = "Activate";
  121. }
  122. else if (dws.Method4(textbox1.Text, textbox2.Text) > 0)
  123. {
  124. this.Hide();
  125. GlobalsVar.errornum = 3;
  126. ErrorMessage frm = new ErrorMessage();
  127. if (frm.ShowDialog(NativeWindow.FromHandle(Handle)) == DialogResult.Cancel)
  128. {
  129. IntPtr ip = new IntPtr(Globals.ThisAddIn.Application.Hwnd);
  130. Show(NativeWindow.FromHandle(ip));
  131. }
  132. }
  133. else
  134. {
  135. Hide();
  136. GlobalsVar.errornum = 1;
  137. ErrorMessage frm = new ErrorMessage();
  138. if (frm.ShowDialog(NativeWindow.FromHandle(Handle)) == DialogResult.Cancel)
  139. {
  140. IntPtr ip = new IntPtr(Globals.ThisAddIn.Application.Hwnd);
  141. Show(NativeWindow.FromHandle(ip));
  142. }
  143. }
  144. }
  145. }
  146. }
  147. else
  148. {
  149. textbox1.Enabled = !dws.Method5(textbox1.Text, staString3, txtKey.Text);
  150. textbox2.Enabled = !dws.Method5(textbox1.Text, staString3, txtKey.Text);
  151. txtKey.Enabled = !dws.Method5(textbox1.Text, staString3, txtKey.Text);
  152. if (dws.Method5(textbox1.Text, staString3, txtKey.Text))
  153. {
  154. if (writeRegKeys(txtKey.Text, txtOrderID.Text, txtEmail.Text, GetProcIDMan(), 1, 1, 1, 1, 2, 1, DateTime.Today.Date, AssemblyVersion, 1, "http://{Company Name}/{Product}/"))
  155. {
  156. this.Close();
  157. }
  158. else
  159. {
  160. Hide();
  161. GlobalsVar.errornum = 4;
  162. ErrorMessage frm = new ErrorMessage();
  163. if (frm.ShowDialog(NativeWindow.FromHandle(Handle)) == DialogResult.Cancel)
  164. {
  165. IntPtr ip = new IntPtr(Globals.ThisAddIn.Application.Hwnd);
  166. Show(NativeWindow.FromHandle(ip));
  167. }
  168. }
  169. }
  170. else
  171. {
  172. Hide();
  173. GlobalsVar.errornum = 2;
  174. ErrorMessage frm = new ErrorMessage();
  175. if (frm.ShowDialog(NativeWindow.FromHandle(Handle)) == DialogResult.Cancel)
  176. {
  177. IntPtr ip = new IntPtr(Globals.ThisAddIn.Application.Hwnd);
  178. Show(NativeWindow.FromHandle(ip));
  179. }
  180. }
  181. ThisAddIn.Method0();
  182. }
  183. }
  184. catch (Exception ex)
  185. {
  186. MessageBox.Show(ex.ToString());
  187. }
  188. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement