[wdmaudiodev] Need help !!!

  • From: "Nitin Porwal (HCL Technologies Ltd)" <v-nitinp@xxxxxxxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Sat, 10 Apr 2004 21:11:27 -0700

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

Other related posts: