Question

Without having to write a low-level Windows driver, but still using either Java or some C-based API, is it possible to read/write from/to a raw, unpartitioned drive... one that has got no file-system on it?

A short sample program would help. If not, at least knowing what standard Windows/Java (or, 3rd Party) API I could use in userspace (without having to write a device driver) would help.

Was it helpful?

Solution

It is possible to access a raw disk using the CreateFile() function by passing

 "\\.\PhysicalDriveX"

as name.

Where X is a 0-based index counting the drives.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top