Win 98 share Memory in user mode and kernel mode

Dear All:

I need share memory in Win 98, so I in user mode write:

PCHAR sectionName = “SecSharedMemory”;

hmapping = CreateFileMapping( (HANDLE)0xFFFFFFFF,
NULL,
PAGE_READWRITE | SEC_COMMIT,
0,
length,
sectionName
);

fileData = MapViewOfFile( hmapping,
FILE_MAP_READ | FILE_MAP_WRITE,
0,
0,
0
);

but I can’t mapping in kernrl mode:

RtlInitAnsiString(&ansiStr, “\BaseNamedObjects\ SecSharedMemory”);

status = RtlAnsiStringToUnicodeString(&sectionNameUnicodeString,
&ansiStr,
TRUE);

objectAttributes.Length = sizeof( OBJECT_ATTRIBUTES );
objectAttributes.RootDirectory = (HANDLE) NULL;
objectAttributes.Attributes = OBJ_CASE_INSENSITIVE;
objectAttributes.ObjectName = &sectionNameUnicodeString;
objectAttributes.SecurityDescriptor = (PSECURITY_DESCRIPTOR) NULL;
objectAttributes.SecurityQualityOfService = NULL;

//When I call the routine occure error,

status = ZwOpenSection (&sectionHandle,
SECTION_ALL_ACCESS,
&objectAttributes);

Do I slove the question?
Regards


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com