Skip to content

Latest commit

 

History

History
81 lines (64 loc) · 2.06 KB

termserv.md

File metadata and controls

81 lines (64 loc) · 2.06 KB

Remote Desktop Services

Contents

Reference

Classes

Session

  • SessionT<Win32Ex::String>
  • Example
    • Creating a system account process and user account process in each sessions.

      for (auto session : Win32Ex::System::Session::All())
      {
          auto process = session->NewProcess(Win32Ex::System::UserAccount, "notepad");
          if (process.IsOk())
          {
              process->RunAsync().Wait(500);
              process->Exit();
          }
          process = session->NewProcess(Win32Ex::System::SystemAccount, "notepad");
          if (process.IsOk())
          {
              process->RunAsync().Wait(500);
              process->Exit();
          }
      }

SessionW

  • SessionT<Win32Ex::StringW>

SessionT<class StringType = Win32Ex::StringT>

Namespaces

ThisSession

  • Example
    • Get the name of this session.

      Win32Ex::ThisSession::Name();
      Win32Ex::ThisSession::NameW();
      Win32Ex::ThisSession::NameT();
      Win32Ex::ThisSession::NameT<Win32Ex::String>();
    • Creating a system account process and user account process in this session.

      auto process = Win32Ex::ThisSession::NewProcess(Win32Ex::System::UserAccount, "notepad");
      if (process.IsOk())
      {
          process->RunAsync().Wait(500);
          process->Exit();
      }
      process = Win32Ex::ThisSession::NewProcess(Win32Ex::System::SystemAccount, "notepad");
      if (process.IsOk())
      {
          process->RunAsync().Wait(500);
          process->Exit();
      }