How to copy array of structures to Irp->AssociatedIrp.SystemBuffer?

Hi,

How to copy array of structure values to
Irp->AssociatedIrp.SystemBuffer of a device driver, so that it can be sent to the application?

Thanks,
Harsha


Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.

Harsha Inamdar wrote:

How to copy array of structure values to
Irp->AssociatedIrp.SystemBuffer of a device driver, so that it can be
sent to the application?

RtlMoveMemory is the traditional way.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Just by RtlCopyMemory(). The structures must not contain any pointers.

Don’t forget to set Irp->IoStatus.Information to the filled size in bytes,
it will be *BytesReturned in DeviceIoControl.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Harsha Inamdar”
To: “Windows System Software Devs Interest List”
Sent: Tuesday, April 25, 2006 2:31 AM
Subject: [ntdev] How to copy array of structures to
Irp->AssociatedIrp.SystemBuffer?

> Hi,
>
> How to copy array of structure values to
> Irp->AssociatedIrp.SystemBuffer of a device driver, so that it can be sent
to the application?
>
> Thanks,
> Harsha
>
>
> ---------------------------------
> Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer