예제 #1
0
 /// <summary>
 /// Initiates the external PEiD plugin...
 /// </summary>
 /// <param name="dllName">Full Path of Plugin...</param>
 /// <param name="szFileName">Filename that is present in DNiD...</param>
 /// <param name="myWindowControl">Handle of DNiD's main-window...</param>
 public static void doPluginJob(string dllName, string szFileName, Control myWindowControl)
 {
     log.Log(LogType.Normal, "doPluginJob");
     try
     {
         var hWnd = GetSafeHandle(myWindowControl);
         var a    = clsNativeDllLoader.load_function <clsNativeDllLoader.DoMyJob>("DoMyJob", dllName);
         var b    = a(hWnd, Marshal.StringToHGlobalAnsi(szFileName), 0, 0);
     }
     catch (Exception ex)
     {
         log.Log(ex, "Unforseen exception occured!");
         using (var frm = new intForms.frmError("[doPluginJob]" + Environment.NewLine + ex.Message + Environment.NewLine + Environment.NewLine + "InternalHelpLink: " + ex.HelpLink))
         {
             frm.ShowDialog();
         }
     }
 }
예제 #2
0
 private static string LoadDllInfo(string pluginDll)
 {
     log.Log(LogType.Normal, "LoadDllInfo");
     try
     {
         var a = clsNativeDllLoader.load_function <clsNativeDllLoader.LoadDll>("LoadDll", pluginDll);
         var b = Marshal.PtrToStringAnsi(a());
         return(b);
     }
     catch (Exception ex)
     {
         log.Log(ex, "Unforseen exception occured!");
         using (var frm = new intForms.frmError("[LoadDllInfo]" + Environment.NewLine + ex.Message + Environment.NewLine + Environment.NewLine + "InternalHelpLink: " + ex.HelpLink))
         {
             frm.ShowDialog();
         }
         return(null);
     }
 }