Originally posted by: sali
I am running 2 16 bit applications in different memory space. So two instances of ntvdm are loaded. How to get the process ID of a specific ntvdm using vb so that I will be able to kill one using code. (kill.exe works, but kills all the ntvdm present in the TaskManager)
Originally posted by: SENTHIL
This site is really helped to me get the Damenon Process ID.
Thanks
Senthil
ReplyOriginally posted by: Rajesh
Hi
to run this application i should know which OS i m using?? i need common function which can be applicable for all window OS. Is it possible??
any comment, suggesions are welcomed
thanx in advance
rajesh
Originally posted by: Comp Wang
HWND m_MainhWnd;
m_MainhWnd=0;
::SetParent(m_MainhWnd,m_hWnd);
at last,it change the running notepad window' style.
Then how can i do the samething in 98 as nt?
in NT,i write:
DWORD g_id;
BOOL CALLBACK MyEnumThreadWndProc( HWND hwnd,LPARAM lParam)
{
DWORD id;
GetWindowThreadProcessId(hwnd,&id);
if(m_MainhWnd)
return 0;
if(id==g_id)
{
m_MainhWnd=hwnd;
return 0;
}
return 1;
}
void CTestDlg::OnRun()
{
if(m_MainhWnd)
return ;
int m,n;
ZeroMemory(&m_si,sizeof(STARTUPINFO));
ZeroMemory(&m_pi,sizeof(PROCESS_INFORMATION));
m_si.cb=sizeof(STARTUPINFO);
m_si.dwFlags=STARTF_USESHOWWINDOW;
m_si.wShowWindow=SW_HIDE;
CreateProcess(NULL,"notepad",NULL,NULL,true,0,NULL,NULL,&m_si,&m_pi);
g_id=m_pi.dwProcessId;
while(!m_MainhWnd)
EnumWindows(&MyEnumThreadWndProc,0);
LONG a=::GetWindowLong(m_MainhWnd,GWL_STYLE);
a=::SetWindowLong(m_MainhWnd,GWL_STYLE,a);
if(a)
MessageBox("");
::ShowWindow(m_MainhWnd,SW_SHOW);
}
But in win98,it cant' ,and Setwindowlong return 0.
Originally posted by: Jenny
How Can I Use ::SendMessage() with process handle ?
<How can I get HWND of the exe program with process handle ? >
I use CreateProcess() to run a exe program
and I can get process handle in PROCESS_INFORMATION.
I want to send message to running program with process handle.
How can I send message to running program with process handle.
I am going to use ::SendMessage().
I only know process handle.
but the first argument of ::SendMessage() is HWND type.
How can I get HWND of the exe program with process handle.
Please answer my question.
Thank you
Originally posted by: Ravindra Singh
Hi !
Please tell me How Can I call One method of a DLL running in Different Process.
OR
How to tell That Different Process to call that Function.
Ravi
Reply
Originally posted by: Ravi.G
Finding Active window and running sdk programming in the background like task manager
ReplyOriginally posted by: John
Best Regards,
Getting process path from active window.
Help.
John mailto:punk@post.com
Originally posted by: Charleston Thai
On Windows, I have a couple of Java apps that are launched
Batch B:
From the Task Manager or from the Process control API
Is it possible to distinguish (let's say process id 0x77
Any help would be greatly appreciated.
thanks,
Hi,
via batch files.
For instance:
Batch A:
'jre -classpath d:\AppB\lib;%classpath% com.app.AppA'
'jre -classpath d:\AppB\lib;%classpath% com.app.AppB'
(psapi.dll), I can only retrieve the File Name and its
process id. In this case, the filename for (for examples)
Batch A:
"c:\jdk117b\bin\jre.exe" and its process id is "0x77"
Batch B:
"c:\jdk117b\bin\jre.exe" and its process id is "0x8e"
belongs to Batch A file)?
/Charleston
Originally posted by: Rpmohan
Also, I dont have psapi.h header file. where can i get this file?
Dear Sir,
Thank u Very much for ur Article.
I want to write a program that would write when any application starts and shuts down in a file. How do I do it? I have known, how to get the process id and file from ur program. like, can i get when it started?
The format of my file should be as below
Application name When it started when it shut down
---------------- --------------- --------------