Hi, I have written a PCI device driver. I need to create a file from driver. I tried with ZwCreateFile and ZwWriteFile functions, but it didn't work. Does anybody have any sample code for this? I used these function - ntStatus = ZwCreateFile(&pDevExt->hLogFile, FILE_APPEND_DATA|GENERIC_WRITE|SYNCHRONIZE, &objectAttributes, &IoStatus, 0, FILE_ATTRIBUTE_NORMAL, FILE_SHARE_WRITE, FILE_OVERWRITE_IF, FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_ALERT, NULL, 0 ); ZwWriteFile(pDevExt->hLogFile, NULL, NULL, NULL,&IoStatus,pDevExt->achBuffer,ulLength,NULL,NULL); Is anything wrong with the calls? The file is getting created properly but writes are failing. If anybody has any solution, then please revert back to me. Thanks Nitin