CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 1999
    Posts
    70

    How to invoke Hyperterminal from My application?

    I have to invoke the windows Hyperterminal from my application. How do i do it?


  2. #2
    Join Date
    May 1999
    Location
    Texas, USA
    Posts
    568

    Re: How to invoke Hyperterminal from My application?

    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.




  3. #3
    Join Date
    May 1999
    Location
    Texas, USA
    Posts
    568

    Re: How to invoke Hyperterminal from My application?

    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();
    }






  4. #4
    Join Date
    Apr 1999
    Posts
    70

    Re: How to invoke Hyperterminal from My application?

    Thanks for the code..I will try it out



  5. #5
    Join Date
    Jul 1999
    Posts
    535

    Re: How to invoke Hyperterminal from My application?

    wouldn't it be easier to use ShellExecute????
    I may be wrong, I'm just a beginner..
    please correct me if I am...


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured