The machine this is running on is the domain controller and the Windows
account I am using to run the code is in the Admin group of that domain.
Since security attributes parameter is NULL and the memory segment name is
local, this should work according to all the documentation I have read. I did
try to set the security attributes on the memory segment and open it up to
all authenticated uses, but that didn't work either.
I suspect I am being limited by some security policy because I am running on
the console. Any ideas how I can allow a console login the ability to create
shared memory regions will be appreciated.
Mark
This is a code snippet:
LPCTSTR MappingName =_T("Local\\AuthDllSharedMem");
HANDLE hMapObject = CreateFileMapping
(
INVALID_HANDLE_VALUE, // use paging file
NULL, // default security attributes
PAGE_READWRITE, // read/write access
0, // size: high 32-bits
SHMEMSIZE, // size: low 32-bits
MappingName ); // name of map object
Have you verified your priviledges on the machine (including GP
restrictions?). I believe gpresult.exe from the command line will do
the trick (you also need RSOP enabled). After verifying local
permissions, I would look at the permissions on Shared Object.
> Since security attributes parameter is NULL and the memory segment name is
> local, this should work according to all the documentation I have read.
:)
Jeff
On Nov 30, 11:39 am, Mark Vee <Mark V...@discussions.microsoft.com>
wrote:
Ah! This is a tricky one.
>This is a code snippet:
>
>LPCTSTR MappingName =_T("Local\\AuthDllSharedMem");
Note that this is subtly different from your text description above in one
very critical way: this is a relative path, not an absolute path, as you
described. I suspect that's the difference. Console sessions, by default,
are rooted in the Global space to begin with, so you're actually creating
\Global\Local\AuthDllSharedMem.
I suspect if you change that to
LPCTSTR MappingName = _T("\\Local\\AuthDllSharedMem");
it will work as you expect.
--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.
"Tim Roberts" <ti...@probo.com> wrote in message
news:n6u3l39hopkr82c9h...@4ax.com...
You're right. I convinced myself that I had read an MSDN article to the
contrary, but I must have been imagining it.