E
EagleChen
Hello,
I tried to use CreateFileMapping() in Terminal Server environment, and I can
do it successfully
with Administrator login, but will get ERROR_ACCESS_DENIED using a normal
user.
Does anyone know how to set the authority to normal user? or any hints ?
Thanks in advance, and the following is my code:
Eagle
InitializeSecurityDescriptor(&SecurityDescriptor,
SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorSacl(&SecurityDescriptor, false, NULL, true);
SetSecurityDescriptorDacl(&SecurityDescriptor, true, NULL, false);
SetSecurityDescriptorOwner(&SecurityDescriptor, NULL, false);
SetSecurityDescriptorGroup(&SecurityDescriptor, NULL, false);
//
SecurityAttribute.bInheritHandle = true;
SecurityAttribute.lpSecurityDescriptor=&SecurityDescriptor;
SecurityAttribute.nLength=sizeof(SecurityAttribute);
//
hMapObject = CreateFileMapping(
INVALID_HANDLE_VALUE,
&SecurityAttribute,
PAGE_READWRITE,
0,
1024, // size: low 32-bits
"Global\\ixgclientsharedmemory");
I tried to use CreateFileMapping() in Terminal Server environment, and I can
do it successfully
with Administrator login, but will get ERROR_ACCESS_DENIED using a normal
user.
Does anyone know how to set the authority to normal user? or any hints ?
Thanks in advance, and the following is my code:
Eagle
InitializeSecurityDescriptor(&SecurityDescriptor,
SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorSacl(&SecurityDescriptor, false, NULL, true);
SetSecurityDescriptorDacl(&SecurityDescriptor, true, NULL, false);
SetSecurityDescriptorOwner(&SecurityDescriptor, NULL, false);
SetSecurityDescriptorGroup(&SecurityDescriptor, NULL, false);
//
SecurityAttribute.bInheritHandle = true;
SecurityAttribute.lpSecurityDescriptor=&SecurityDescriptor;
SecurityAttribute.nLength=sizeof(SecurityAttribute);
//
hMapObject = CreateFileMapping(
INVALID_HANDLE_VALUE,
&SecurityAttribute,
PAGE_READWRITE,
0,
1024, // size: low 32-bits
"Global\\ixgclientsharedmemory");