Has anyone else had problems with this API?

I can't get the example to work. It always returns zero for nSizw.

nSize = GetFileSize(hOrgFile, 0)

Then I get Subscript out of range at
ReDim bBytes(1 To nSize - Int(nSize / 2)) As Byte.

Is this a know problem which people can help me with, or does anyone know a better way to ensure a file they are trying to write to is not "Read Only", and make "Read & Write".

Thanks