sats
September 3rd, 1999, 09:02 AM
I have to invoke the windows Hyperterminal from my application. How do i do it?
|
Click to See Complete Forum and Search --> : How to invoke Hyperterminal from My application? sats September 3rd, 1999, 09:02 AM I have to invoke the windows Hyperterminal from my application. How do i do it? Wayne Fuller September 3rd, 1999, 10:34 AM Call the function CreateProcess like so. STARTUPINFO si; PROCESS_INFORMATION pi; ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); si.dwFlags = STARTF_USESHOWWINDOW; si.wShowWindow = SW_SHOWNORMAL; if ( CreateProcess(_T("hypertrm.exe"), NULL, NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi) { CloseHandle(pi.hThread); CloseHandle(pi.hProcess); } Let me know if that helps. Wayne Fuller September 3rd, 1999, 10:55 AM Sorry, I typed before I tested. This does work on my machine. // Path is found in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\hypertrm.exe STARTUPINFO si; PROCESS_INFORMATION pi; ZeroMemory(&si, sizeof(si)); si.cb = sizeof(si); si.dwFlags = STARTF_USESHOWWINDOW; si.wShowWindow = SW_SHOWNORMAL; if ( CreateProcess(NULL, _T("\"E:\\Program Files\\Windows NT\\Hypertrm.exe\""), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi) ) { CloseHandle(pi.hThread); CloseHandle(pi.hProcess); } else { DWORD dwData = GetLastError(); } sats September 4th, 1999, 04:33 AM Thanks for the code..I will try it out cube01 September 4th, 1999, 04:40 AM wouldn't it be easier to use ShellExecute???? I may be wrong, I'm just a beginner.. please correct me if I am... codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |