I have problem in " ZwMapViewOfSection " in my file system filter driver.
It returned status is STATUS_INVALID_PARAMETER_3 .I have gone thru the previous archives …there was a thread related to this .But I could take any help from that .
Here is my code ,I am calling this xxxxCreateShare() function in CREATE DISPATCH…
void xxxxCreateShare()
{
NTSTATUS ntstatus;
OBJECT_ATTRIBUTES objectAttributes;
Pxxx_SHARE_DATA sharedata;
PVOID baseaddr;
UNICODE_STRING ShareName;
LARGE_INTEGER SectionOffset;
LARGE_INTEGER MaximumSize;
SIZE_T ViewSize;
HANDLE SectionHandle;
WCHAR ShareNameBuffer = L"\BaseNamedObjects\TestMemory";
sharedata = NULL;
MaximumSize.LowPart=sizeof(xxx_SHARE_DATA);
MaximumSize.HighPart=0;
RtlInitUnicodeString(&ShareName,ShareNameBuffer);
InitializeObjectAttributes( &objectAttributes, &ShareName,
OBJ_CASE_INSENSITIVE, NULL, NULL );
ntstatus = ZwOpenSection( &SectionHandle , SECTION_MAP_WRITE|SECTION_MAP_READ ,&objectAttributes );
ntstatus = ZwMapViewOfSection( SectionHandle,
PsGetCurrentProcessId(),
&baseaddr,
0,
sizeof(xxx_SHARE_DATA),
&SectionOffset,
&ViewSize,
ViewShare,
0,
PAGE_READWRITE ) ;
}
I could open the section successfully…But when calling ZwMapViewOfSection it returns STATUS_INVALID_PARAMETER_3 .
Any idea where I am wrong …
PRIYA MS
Do you Yahoo!?
Dress up your holiday email, Hollywood style. Learn more.