Click here to Skip to main content
15,897,704 members
Home / Discussions / C#
   

C#

 
AnswerRe: Items.Clear() not working in ComboBox control??? Pin
Dan Mos19-Jan-10 12:48
Dan Mos19-Jan-10 12:48 
QuestionWould this validate an Email ??? Pin
Paw Jershauge19-Jan-10 11:19
Paw Jershauge19-Jan-10 11:19 
AnswerRe: Would this validate an Email ??? Pin
Pete O'Hanlon19-Jan-10 12:19
mvePete O'Hanlon19-Jan-10 12:19 
GeneralRe: Would this validate an Email ??? Pin
Paw Jershauge19-Jan-10 20:51
Paw Jershauge19-Jan-10 20:51 
QuestionRunDll32.exe Help Pin
User 674486819-Jan-10 11:07
professionalUser 674486819-Jan-10 11:07 
AnswerRe: RunDll32.exe Help Pin
Paw Jershauge19-Jan-10 11:30
Paw Jershauge19-Jan-10 11:30 
GeneralRe: RunDll32.exe Help Pin
Pete O'Hanlon19-Jan-10 11:45
mvePete O'Hanlon19-Jan-10 11:45 
AnswerRe: RunDll32.exe Help Pin
Pete O'Hanlon19-Jan-10 11:39
mvePete O'Hanlon19-Jan-10 11:39 
You can do this with WMI. Here's a sample combining the Process and ManagementObject classes to show some useful info:
string process = "SELECT CommandLine FROM Win32_Process WHERE ProcessID = {0}";
foreach (Process p in Process.GetProcessesByName("rundll32"))
{
  using (ManagementObjectSearcher mos = new ManagementObjectSearcher(string.Format(process, p.Id)))
  {
    foreach (ManagementObject mo in mos.Get())
    {
      string[] commandLine = mo["CommandLine"].ToString().Split(',');
      Console.WriteLine(string.Format("{0} was started at {1}.", 
        commandLine[0].Substring(commandLine[0].IndexOf(" ") + 1), p.StartTime));
    }
  }
}
There's a whole hunk of substringing going on with the command line to get the DLL because the command line would be Rundll32.exe c:\PathToMyDll\MyDll.dll,Entrypoint so we need to parse it out.

"WPF has many lovers. It's a veritable porn star!" - Josh Smith

As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.


My blog | My articles | MoXAML PowerToys | Onyx



GeneralRe: RunDll32.exe Help Pin
User 674486819-Jan-10 20:59
professionalUser 674486819-Jan-10 20:59 
AnswerRe: RunDll32.exe Help Pin
Paw Jershauge19-Jan-10 21:39
Paw Jershauge19-Jan-10 21:39 
QuestionEXCEPTION HANDLING Pin
mukundkallapur19-Jan-10 8:09
mukundkallapur19-Jan-10 8:09 
AnswerRe: EXCEPTION HANDLING Pin
Jimmanuel19-Jan-10 8:14
Jimmanuel19-Jan-10 8:14 
AnswerRe: EXCEPTION HANDLING Pin
Bardy8519-Jan-10 8:36
Bardy8519-Jan-10 8:36 
AnswerRe: EXCEPTION HANDLING Pin
Migounette19-Jan-10 12:15
Migounette19-Jan-10 12:15 
QuestionMobile webbrowser control not displaying local image... Pin
Jacob Dixon19-Jan-10 4:54
Jacob Dixon19-Jan-10 4:54 
AnswerRe: Mobile webbrowser control not displaying local image... Pin
OriginalGriff19-Jan-10 5:41
mveOriginalGriff19-Jan-10 5:41 
GeneralRe: Mobile webbrowser control not displaying local image... Pin
Jacob Dixon19-Jan-10 6:03
Jacob Dixon19-Jan-10 6:03 
AnswerRe: Mobile webbrowser control not displaying local image... Pin
Luc Pattyn19-Jan-10 5:46
sitebuilderLuc Pattyn19-Jan-10 5:46 
QuestionShow a modeless form from an app with no main form? Pin
John Whitmire19-Jan-10 4:40
professionalJohn Whitmire19-Jan-10 4:40 
AnswerRe: Show a modeless form from an app with no main form? Pin
John Whitmire20-Jan-10 6:41
professionalJohn Whitmire20-Jan-10 6:41 
GeneralRating my Article Pin
ADNANE-Dev19-Jan-10 3:08
ADNANE-Dev19-Jan-10 3:08 
GeneralSort of Repost of something that was flamed in the first place Pin
Keith Barrow19-Jan-10 3:12
professionalKeith Barrow19-Jan-10 3:12 
GeneralRe: Sort of Repost of something that was flamed in the first place Pin
OriginalGriff19-Jan-10 3:48
mveOriginalGriff19-Jan-10 3:48 
GeneralRe: Rating my Article Pin
Not Active19-Jan-10 3:45
mentorNot Active19-Jan-10 3:45 
RantRe: Rating my Article Pin
dan!sh 19-Jan-10 3:49
professional dan!sh 19-Jan-10 3:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.