>>>Hi,
>>>Is it possible that bad programming with VFP will cause bad sector on harddisk, and certain files will be lost/dissapear??
>>>
>>>If not, any possiblity?
>>
>>The only case where I heard that software could harm hardware was Commodore 128, more than a dozen years ago, where a certain machine code sequence was able to burn one chip. Never heard of any of those later or before.
>>
>>The code to create a bad sector should have access to disk's internal logic, which is probably feasible in theory, but is practically impossible to do with p-code.
>
>Actually, the mechanism to mark a bad sector doesn't involve much beyond the ability to manipulate the FAT on FAT12, FAT16 and FAT32 volumes; DeviceIoControl() is certainly capable of talking to the disk-level driver and doing this. And since FAT isn't terribly secure, a devious and nasty programmer could simple jumble both copies of the FAT in an interesting fashion by determinging the location of each FAT on the volume, a simple enough mechanism!
>
>And I'm not even being creative...
To fake a bad sector, sure. I meant creating a real bad sector, which is a horse of a slightly different color :)