Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
2.4 KiB

  1. /*************************************************************************
  2. *
  3. * execsrv.h
  4. *
  5. * Common header file for remote WinStation exec service
  6. *
  7. * Copyright Microsoft Corporation, 1998
  8. *
  9. *
  10. *
  11. *************************************************************************/
  12. // Server: WinLogon per WinStation
  13. #define EXECSRV_SYSTEM_PIPE_NAME L"\\\\.\\Pipe\\TerminalServer\\SystemExecSrvr\\%d" // winlogon
  14. #define EXECSRV_BUFFER_SIZE 8192
  15. /*
  16. * Data structure passed for a remote exec request
  17. *
  18. * This basicily exports the WIN32 CreateProcessW() API.
  19. *
  20. * NOTE: pointers are self relative
  21. *
  22. */
  23. typedef struct _EXECSRV_REQUEST {
  24. DWORD Size; // total size in request
  25. DWORD RequestingProcessId; // To allow the handle DUP to the requestor
  26. BOOL System; // TRUE if create under system context
  27. // CreateProcessW() parameters
  28. HANDLE hToken;
  29. PWCHAR lpszImageName;
  30. PWCHAR lpszCommandLine;
  31. SECURITY_ATTRIBUTES saProcess;
  32. SECURITY_ATTRIBUTES saThread;
  33. BOOL fInheritHandles;
  34. DWORD fdwCreate;
  35. LPVOID lpvEnvironment;
  36. LPWSTR lpszCurDir;
  37. STARTUPINFOW StartInfo;
  38. PROCESS_INFORMATION ProcInfo;
  39. } EXECSRV_REQUEST, *PEXECSRV_REQUEST;
  40. typedef struct _EXECSRV_REPLY {
  41. DWORD Size;
  42. BOOLEAN Result;
  43. DWORD LastError;
  44. //
  45. // NOTE: The handles for hProcess and hThread are converted from the
  46. // remote exec server into the requestors process using the
  47. // RequestingProcess handle in the request.
  48. //
  49. PROCESS_INFORMATION ProcInfo;
  50. } EXECSRV_REPLY, *PEXECSRV_REPLY;
  51. BOOL
  52. WinStationCreateProcessW(
  53. ULONG LogonId,
  54. BOOL System,
  55. PWCHAR lpszImageName,
  56. PWCHAR lpszCommandLine,
  57. PSECURITY_ATTRIBUTES psaProcess,
  58. PSECURITY_ATTRIBUTES psaThread,
  59. BOOL fInheritHandles,
  60. DWORD fdwCreate,
  61. LPVOID lpvEnvionment,
  62. LPWSTR lpszCurDir,
  63. LPSTARTUPINFOW pStartInfo,
  64. LPPROCESS_INFORMATION pProcInfo
  65. );
  66. //
  67. // For non-UNICODE clients
  68. //
  69. BOOL
  70. WinStationCreateProcessA(
  71. ULONG LogonId,
  72. BOOL System,
  73. PCHAR lpszImageName,
  74. PCHAR lpszCommandLine,
  75. PSECURITY_ATTRIBUTES psaProcess,
  76. PSECURITY_ATTRIBUTES psaThread,
  77. BOOL fInheritHandles,
  78. DWORD fdwCreate,
  79. LPVOID lpvEnvionment,
  80. LPCSTR lpszCurDir,
  81. LPSTARTUPINFOA pStartInfo,
  82. LPPROCESS_INFORMATION pProcInfo
  83. );