11#define WIN32_NO_STATUS
13#define COM_NO_WINDOWS_H
69 DPRINT(
"SMLIB: %s(%p, '%wZ') called\n",
92 DPRINT1(
"SMLIB: RtlCreateProcessParameters failed for %wZ - Status == %lx\n",
98 ProcessInfo.
Size =
sizeof(ProcessInfo);
121 DPRINT1(
"SMLIB: Failed load of %wZ - Status == %lx\n",
202 ULONG KeyValueInformationLength = 1024;
213 L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\SubSystems");
235 KeyValueInformationLength);
236 if (!KeyValueInformation)
248 KeyValueInformationLength,
254 RtlFreeHeap(RtlGetProcessHeap(), 0, KeyValueInformation);
278 Length = 2 * KeyValueInformationLength;
282 if (!DestinationBuffer)
306 RtlFreeHeap(RtlGetProcessHeap(), 0, DestinationBuffer);
322 RtlFreeHeap(RtlGetProcessHeap(), 0, KeyValueInformation);
376#if defined(__REACTOS__) && DBG
382 switch (SmInformationClass)
417 SmApiMsg.
h.u2.ZeroInit = 0;
425 SmApiMsg.
h.u1.s1.TotalLength = SmApiMsg.
h.u1.s1.DataLength +
sizeof(SmApiMsg.
h);
431 DPRINT1(
"SMLIB: %s: NtRequestWaitReplyPort failed, Status: 0x%08lx\n",
442 if (ReturnedDataLength)
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
_In_ ULONG _In_opt_ WDFREQUEST _In_opt_ PVOID _In_ size_t _In_ PVOID _In_ size_t _Out_ size_t * DataLength
#define NT_SUCCESS(StatCode)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
#define OBJ_CASE_INSENSITIVE
NTSYSAPI NTSTATUS WINAPI RtlExpandEnvironmentStrings_U(PCWSTR, const UNICODE_STRING *, UNICODE_STRING *, ULONG *)
PVOID PVOID PWCHAR PVOID Environment
#define InitializeObjectAttributes(p, n, a, r, s)
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
NTSYSAPI NTSTATUS NTAPI RtlDestroyProcessParameters(_In_ PRTL_USER_PROCESS_PARAMETERS ProcessParameters)
NTSYSAPI NTSTATUS NTAPI RtlCreateProcessParameters(_Out_ PRTL_USER_PROCESS_PARAMETERS *ProcessParameters, _In_ PUNICODE_STRING ImagePathName, _In_opt_ PUNICODE_STRING DllPath, _In_opt_ PUNICODE_STRING CurrentDirectory, _In_opt_ PUNICODE_STRING CommandLine, _In_opt_ PWSTR Environment, _In_opt_ PUNICODE_STRING WindowTitle, _In_opt_ PUNICODE_STRING DesktopInfo, _In_opt_ PUNICODE_STRING ShellInfo, _In_opt_ PUNICODE_STRING RuntimeInfo)
_In_ PUNICODE_STRING _Inout_ PUNICODE_STRING Destination
NTSYSAPI NTSTATUS NTAPI RtlCreateUserProcess(_In_ PUNICODE_STRING ImageFileName, _In_ ULONG Attributes, _In_ PRTL_USER_PROCESS_PARAMETERS ProcessParameters, _In_opt_ PSECURITY_DESCRIPTOR ProcessSecutityDescriptor, _In_opt_ PSECURITY_DESCRIPTOR ThreadSecurityDescriptor, _In_opt_ HANDLE ParentProcess, _In_ BOOLEAN CurrentDirectory, _In_opt_ HANDLE DebugPort, _In_opt_ HANDLE ExceptionPort, _Out_ PRTL_USER_PROCESS_INFORMATION ProcessInfo)
#define RTL_USER_PROCESS_PARAMETERS_NX
NTSYSAPI NTSTATUS NTAPI NtOpenKey(OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes)
@ KeyValuePartialInformation
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
NTSYSAPI NTSTATUS NTAPI NtQueryValueKey(IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, IN PVOID KeyValueInformation, IN ULONG Length, IN PULONG ResultLength)
NTSTATUS NTAPI NtClose(IN HANDLE Handle)
struct _KEY_VALUE_PARTIAL_INFORMATION * PKEY_VALUE_PARTIAL_INFORMATION
_In_ ULONG _In_ ULONG _In_ ULONG Length
NTSTATUS NTAPI NtRequestWaitReplyPort(IN HANDLE PortHandle, IN PPORT_MESSAGE LpcRequest, IN OUT PPORT_MESSAGE LpcReply)
#define STATUS_INVALID_PARAMETER_2
#define STATUS_NOT_IMPLEMENTED
#define STATUS_INVALID_PARAMETER_1
PWCHAR SmpDefaultEnvironment
NTSTATUS NTAPI SmExecPgm(_In_ HANDLE SmApiPort, _In_ PRTL_USER_PROCESS_INFORMATION ProcessInformation, _In_ BOOLEAN DebugFlag)
Requests the SM to start a process under a new environment session.
struct _SM_SUBSYSTEM_INFORMATION * PSM_SUBSYSTEM_INFORMATION
#define SM_API_QUERY_INFORMATION
struct _SM_QUERYINFO_MSG SM_QUERYINFO_MSG
NTSTATUS NTAPI SmExecuteProgram(_In_ HANDLE SmApiPort, _In_ PUNICODE_STRING Program)
This function is used to make the SM start an external process under an already-loaded environment su...
NTSTATUS NTAPI SmQueryInformation(_In_ HANDLE SmApiPort, _In_ SM_INFORMATION_CLASS SmInformationClass, _Inout_ PVOID Data, _In_ ULONG DataLength, _Inout_opt_ PULONG ReturnedDataLength)
Retrieves information about subsystems registered with the SM.
NTSTATUS NTAPI SmLookupSubsystem(_In_ PWSTR Name, _Out_ PWSTR Data, _Inout_ PULONG DataLength, _Out_opt_ PULONG DataType, _In_opt_ PVOID Environment)
Reads from the registry key \Registry\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems the...
base for all directory entries
union _SM_API_MSG::@3521 u
SMSRV_API_NUMBER ApiNumber
SM_INFORMATION_CLASS SmInformationClass
SM_SUBSYSTEM_INFORMATION SubSystemInformation
SM_BASIC_INFORMATION BasicInformation
#define FIELD_OFFSET(t, f)
#define RtlCopyMemory(Destination, Source, Length)
#define STATUS_INVALID_PARAMETER
#define STATUS_INFO_LENGTH_MISMATCH
_Must_inspect_result_ _In_ WDFDEVICE _In_ DEVICE_REGISTRY_PROPERTY _In_ ULONG _Out_ PULONG ResultLength