Click here to Skip to main content
15,890,185 members
Home / Discussions / C#
   

C#

 
QuestionWebPage download - limit download speed Pin
DUMITRU Guraliuc3-Jan-06 2:30
DUMITRU Guraliuc3-Jan-06 2:30 
AnswerRe: WebPage download - limit download speed Pin
navvara the infantryman3-Jan-06 2:49
navvara the infantryman3-Jan-06 2:49 
QuestionClosing Window Pin
rakesh_nits3-Jan-06 2:16
rakesh_nits3-Jan-06 2:16 
AnswerRe: Closing Window Pin
joe carbone3-Jan-06 2:47
joe carbone3-Jan-06 2:47 
GeneralRe: Closing Window Pin
rakesh_nits3-Jan-06 3:06
rakesh_nits3-Jan-06 3:06 
GeneralRe: Closing Window Pin
joe carbone3-Jan-06 3:12
joe carbone3-Jan-06 3:12 
GeneralRe: Closing Window Pin
rakesh_nits3-Jan-06 4:57
rakesh_nits3-Jan-06 4:57 
GeneralRe: Closing Window Pin
rakesh_nits3-Jan-06 18:30
rakesh_nits3-Jan-06 18:30 
Hi Joe,
My mistake that I hadn't specified the process name "explorer.exe" in the process.now I am able to get the handle but process.kill gives the error that the process is already exited.and closeHandle does not do anything.using getlasterror i am getting the following error.
ERROR_MOD_NOT_FOUND
126 The specified module could not be found.
here is the code
static int WM_CLOSE = 0x0010;
string path = @"C:\Documents and Settings\rakesh\Desktop\A"
pr.StartInfo.CreateNoWindow = true;
pr.StartInfo.Verb = "Open";
pr.StartInfo.FileName = "explorer.exe";
pr.StartInfo.Arguments = path;
pr.Start();
//pr.Kill();//gives the error the process has already exited
iptr = pr.Handle;
SendMessage(iptr,(uint)WM_CLOSE,0,0);
int errorCode = Marshal.GetLastWin32Error();
Console.WriteLine("errorCode::"+errorCode.ToString());//gives errorcode 126
**************************************
Any help will be greatly appreciated.Thanks in Advance.
Rakesh

GeneralRe: Closing Window Pin
joe carbone3-Jan-06 19:39
joe carbone3-Jan-06 19:39 
GeneralRe: Closing Window Pin
rakesh_nits3-Jan-06 20:39
rakesh_nits3-Jan-06 20:39 
GeneralRe: Closing Window Pin
rakesh_nits3-Jan-06 21:07
rakesh_nits3-Jan-06 21:07 
GeneralRe: Closing Window Pin
joe carbone3-Jan-06 22:29
joe carbone3-Jan-06 22:29 
GeneralRe: Closing Window Pin
rakesh_nits4-Jan-06 23:35
rakesh_nits4-Jan-06 23:35 
GeneralRe: Closing Window Pin
rakesh_nits5-Jan-06 1:43
rakesh_nits5-Jan-06 1:43 
GeneralRe: Closing Window Pin
joe carbone5-Jan-06 2:20
joe carbone5-Jan-06 2:20 
AnswerRe: Closing Window Pin
dbrenth21-Oct-08 9:48
dbrenth21-Oct-08 9:48 
QuestionMSMQ Pin
AB77713-Jan-06 1:50
AB77713-Jan-06 1:50 
AnswerRe: MSMQ Pin
S. Akif Kamal3-Jan-06 2:04
S. Akif Kamal3-Jan-06 2:04 
GeneralRe: MSMQ Pin
AB77713-Jan-06 2:10
AB77713-Jan-06 2:10 
GeneralRe: MSMQ Pin
S. Akif Kamal3-Jan-06 3:09
S. Akif Kamal3-Jan-06 3:09 
GeneralRe: MSMQ Pin
AB77713-Jan-06 17:04
AB77713-Jan-06 17:04 
GeneralRe: MSMQ Pin
S. Akif Kamal3-Jan-06 20:40
S. Akif Kamal3-Jan-06 20:40 
GeneralRe: MSMQ Pin
AB77713-Jan-06 21:13
AB77713-Jan-06 21:13 
GeneralRe: MSMQ Pin
S. Akif Kamal3-Jan-06 22:10
S. Akif Kamal3-Jan-06 22:10 
GeneralRe: MSMQ Pin
AB77713-Jan-06 22:15
AB77713-Jan-06 22:15 

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.