r00d0034
August 19th, 2002, 06:45 AM
please read that code and solve mine problem
tmpProcess = new Process();
tmpProcess.WaitForInputIdle();
tmpProcess.StartInfo.FileName="f:\\mirc59t";
try{
tmpProcess.Start();
while(! tmpProcess.Responding)System.Windows.Forms.Application.DoEvents();
}catch{}
tmpProcess.WaitForInputIdle();
IntPtr hWnd=tmpProcess.MainWindowHandle;
Srm=new send_recive_messages(hWnd);
/*/////////////////////////////////////////////////////
managed public __gc class send_recive_messages constructor
////////////////////////////////////////////////////*/
send_recive_messages::send_recive_messages(IntPtr par_hwnd)
{
hwnd=(HWND)par_hwnd.ToInt64();
TCHAR szBuffer[256],szBuffer1[256];
::GetWindowText(hwnd, szBuffer, sizeof(szBuffer) / sizeof(TCHAR));
::GetClassName(hwnd, szBuffer1, sizeof(szBuffer1) / sizeof(TCHAR));
//////////////////////////////////////////////////////////
HWND h=::FindWindowEx(hwnd,0,szBuffer1,szBuffer);
//////////////////////////////////////////////////////////
}//code finish herer
///////////////////////////////////////////
h variable recive zero that's why remaining code could not run.
it should not recive zero because the process main window
contain two button and four Static members.
can any body tell why it recive 0?
and what i have to do so that it should not recive zero?
r00d0034@yahoo.com
tmpProcess = new Process();
tmpProcess.WaitForInputIdle();
tmpProcess.StartInfo.FileName="f:\\mirc59t";
try{
tmpProcess.Start();
while(! tmpProcess.Responding)System.Windows.Forms.Application.DoEvents();
}catch{}
tmpProcess.WaitForInputIdle();
IntPtr hWnd=tmpProcess.MainWindowHandle;
Srm=new send_recive_messages(hWnd);
/*/////////////////////////////////////////////////////
managed public __gc class send_recive_messages constructor
////////////////////////////////////////////////////*/
send_recive_messages::send_recive_messages(IntPtr par_hwnd)
{
hwnd=(HWND)par_hwnd.ToInt64();
TCHAR szBuffer[256],szBuffer1[256];
::GetWindowText(hwnd, szBuffer, sizeof(szBuffer) / sizeof(TCHAR));
::GetClassName(hwnd, szBuffer1, sizeof(szBuffer1) / sizeof(TCHAR));
//////////////////////////////////////////////////////////
HWND h=::FindWindowEx(hwnd,0,szBuffer1,szBuffer);
//////////////////////////////////////////////////////////
}//code finish herer
///////////////////////////////////////////
h variable recive zero that's why remaining code could not run.
it should not recive zero because the process main window
contain two button and four Static members.
can any body tell why it recive 0?
and what i have to do so that it should not recive zero?
r00d0034@yahoo.com