For some reason on my application when running on some configuration of hard disk (RAID, random partitions, through a separate IDE controller, not on the operating systems partition), VirtualAlloc
returns null
with the GetLastError
code of ERROR_INVALID_PARAMETER
.
The only parameter apart from the flags (MEM_COMMIT | MEM_TOP_DOWN, PAGE_READWRITE)
passed in is the size calculated as a multiple of the sector size obtained from the disk geometry (unfortunately I cant post code due to NDA etc).
Just wondering if anyone has any experience of this? or if anyone knows any reason why windows might treat page sizes differently on disks that are part of a raid or partitioned?, any help is greatly appreciated thanks!