about ZwWriteFile()

hi,
I use ZwWriteFile() to write something in a file system filer driver,lik this:
case IRP_MJ_WRITE:
ZwCreateFile();
ZwWriteFile(…,buffer,…);
ZwCloseFile();
ExFreePool(buffer);
break;

but it cant write antthing.
this why? and how can I solve this problem?
thsnks in advance!