Is Copy IRP needed for virtual file ??

Hi

I will soon developpe a driver to create drive letter of virtual file managed by a user-mode process windows.

I have seen in the source code FastFAT, each function calls to file, the function “FatCreateIrpContext” is called. It copies the IRP and removes the IRP source.
Why the function FatCreateIrpContext is called ? Why don’t work in the original IRP (IRP_CONTEXT) ?

It’s not quite a file system that I will develop but rather a virtual driver of virtual file soon drive network.

Conclusion :
About the copy IRP , Do I like than FastFAT? i.e copy the irp and delete the original and make a IoCompleteRequest on IRP copied???
If true, what happens if I denie copy the IRP and made a IoCompleteRequest at the end of the function ?

Thank you very much

In French :
Hi,

Je vais bientot attaquer un pilote permettant de cr?er des drive letter de fichiers virtuelles manager par un processus user-mode.

J’ai vu dans le code source fastfat , chaque appelle au fonction de fichiers , la fonction “FatCreateIrpContext” ?tait appel?. Elle recopie l’IRP et supprime l’IRP source.

Ce n’est pas tout ? fait un syst?me de fichier que je vais developper mais plutot un driver letter de fichiers virtuelles.

Conclusion :
Dois-je faire pareille que celle de fastfat ? C’est ? dire recopier l’irp et supprimer l’original et faire un IoCompleteRequest sur l’IRP recopi? ???

Merci beaucoup

You’re not reading the code correctly, the IRP_CONTEXT is just a structure
that FAT creates to assign context to every IRP that it is working on. It
doesn’t make a new IRP and complete the original, that would be a really bad
thing to do.

The FAT code base is large and makes it fairly complex to work with. I
suggest building your own copy of it, loading it on a test machine, and
single stepping some scenarios to start to get familiar with it.

You might also want to take a step back and describe what you’re trying to
accomplish, anytime you think you need a full file system for a project you
probably want to ask some design advice and make sure that it’s required.

-scott


Scott Noone
Consulting Associate
OSR Open Systems Resources, Inc.
http://www.osronline.com

wrote in message news:xxxxx@ntdev…
> Hi
>
> I will soon developpe a driver to create drive letter of virtual file
> managed by a user-mode process windows.
>
> I have seen in the source code FastFAT, each function calls to file, the
> function “FatCreateIrpContext” is called. It copies the IRP and removes
> the IRP source.
> Why the function FatCreateIrpContext is called ? Why don’t work in the
> original IRP (IRP_CONTEXT) ?
>
> It’s not quite a file system that I will develop but rather a virtual
> driver of virtual file soon drive network.
>
> Conclusion :
> About the copy IRP , Do I like than FastFAT? i.e copy the irp and delete
> the original and make a IoCompleteRequest on IRP copied???
> If true, what happens if I denie copy the IRP and made a IoCompleteRequest
> at the end of the function ?
>
> Thank you very much
> ----------------------------------------------
>
> In French :
> Hi,
>
> Je vais bientot attaquer un pilote permettant de créer des drive letter de
> fichiers virtuelles manager par un processus user-mode.
>
> J’ai vu dans le code source fastfat , chaque appelle au fonction de
> fichiers , la fonction “FatCreateIrpContext” était appelé. Elle recopie
> l’IRP et supprime l’IRP source.
>
> Ce n’est pas tout à fait un systéme de fichier que je vais developper mais
> plutot un driver letter de fichiers virtuelles.
>
> Conclusion :
> Dois-je faire pareille que celle de fastfat ? C’est à dire recopier l’irp
> et supprimer l’original et faire un IoCompleteRequest sur l’IRP recopié
> ???
>
> Merci beaucoup
>