My user process needs to communicate with my service process, and I need to be aware of the way it communicates through file mappings and events:
1. Need low privilege
Var
Secmem:security_attributes;
Asd:security_descriptor;
Begin
Fexistsalready: = False;
InitializeSecurityDescriptor (@aSD, security_descriptor_revision);
SetSecurityDescriptorDacl (@aSD, True, Nil, False);
Secmem.nlength: = SizeOf (security_attributes);
Secmem.lpsecuritydescriptor: = @aSD;
Secmem.binherithandle: = False;
Fmaphandle: = CreateFileMapping ($FFFFFFFF, @SecMem, Page_readwrite, 0, Fsize, PChar (fmapname));
2, the kernel object name must start with global\, so that the creation of the object is global, can be accessed, otherwise the system process created and user processes created by the session will belong to a different
Similar to Global\filemap{5ce70063-66c7-4b37-9559-c73901ea70ef}
System process and user process communication