CreateFileMapping return NULL with error 993

Hi

I’m on the development of a virtual file system driver.
This driver allows the user-mode process to manage this virtual files.
It is a virtual drive letter to file system.

Take the example of the drive n: which are virtual file system
Problem:
When I use the API CreateFileMapping on a file loacted drive n:, it return NULL with error code 993.

The file uc.c is exists and f not equal INVALID_HANDLE_VALUE but x is NULL with err=993
The file ui.c is size average 30 000 bytes

f=CreateFile(“n:\ui.c”,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);

SetLastError(0);
HANDLE x=CreateFileMapping(f,NULL,PAGE_READONLY,0,200,NULL);
int err=GetLastError();

The virtual drive file system is created with line :
status=IoCreateDevice(DriverObject,
sizeof (TPARAMVDF),
&dn,
FILE_DEVICE_DISK_FILE_SYSTEM,
FILE_DEVICE_SECURE_OPEN,
FALSE,
&gvd);
IoRegisterFileSystem(gvd);

pardon it’s error err=193 which is returned by GetLastError

193 is "%1 is not a valid Win32 application. ", but you have not specified SEC_IMAGE in API.

Is this error coming from your FS or from MM?

CreateFileMapping Return null
I think because I did not initialize the variable FILE_OBJECT: SectionObjectPointer.

Do - I initialize the variable by SectionObjectPointer each virtual disk or at each file open (IRP_MJ_CREATE)?

If it is necessary to initialize each virtual disk file system , what happens if i initialize variable SectionObjectPointer each file opened (IRP_MJ_CREATE)?

In each IOCTL IRP_MJ_CLOSE function ,I’m probably free this pointer (SectionObjectPointer).