CreateFileMapping return ERROR_ACCESS_DENIED in Terminal Server environment

E

EagleChen

InitializeSecurityDescriptor(&SecurityDescriptor,
SECURITY_DESCRIPTOR_REVISION);
SetSecurityDescriptorDacl(&SecurityDescriptor, true, 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");

There is no problem using administrator-user login, but will get
ERROR_ACCESS_DENIED in non-administrator user login.
Any help ? Thanks in advance,

Eagle
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top