Problem in conversion of virtual address to Physical address

Hi all,

I am writing Win2000 driver for PCI card.
I am passing starting address(virtual address of memory) of an array from
application in one of IOCTL to driver for opened device.
In IOCTL code in driver, i want to convert virtual address passed from
application to actual physical address.
I tried using DDK function “MmGetPhysicalAddress” , as per documentation i
have included ntddk.h in my code.
But still while building my code gives an error stating that
MmGetPhysicalAddress function undefined.

I am unable to trace exact problem behind this error. Could anybody tell me
why?

Is there any other way to do it ?

Urgent help is needed…

Regards,
Anil

The only valid need for physical addresses in drivers is for DMA, and for DMA you must use ->MapTransfer, ->GetScatterGatherList or ->BuildScatterGatherList.

Max

----- Original Message -----
From: Anil
To: NT Developers Interest List
Sent: Tuesday, August 27, 2002 8:24 AM
Subject: [ntdev] Problem in conversion of virtual address to Physical address

Hi all,

I am writing Win2000 driver for PCI card.
I am passing starting address(virtual address of memory) of an array from application in one of IOCTL to driver for opened device.
In IOCTL code in driver, i want to convert virtual address passed from application to actual physical address.
I tried using DDK function “MmGetPhysicalAddress” , as per documentation i have included ntddk.h in my code.
But still while building my code gives an error stating that MmGetPhysicalAddress function undefined.

I am unable to trace exact problem behind this error. Could anybody tell me why?

Is there any other way to do it ?

Urgent help is needed…

Regards,
Anil

You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to %%email.unsub%%