Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi PSDK - read defect sectors ? (https://www.delphipraxis.net/26593-psdk-read-defect-sectors.html)

cdkiller 26. Jul 2004 03:47


PSDK - read defect sectors ?
 
hello,

can i use the platform sdk to read sectors of a disk and show a message if one is defekt ?
when yes, can someone post an example ?

thanks...

cu
cdkiller

Luckie 26. Jul 2004 03:52

Re: PSDK - read defect sectors ?
 
The PSDK ist just the documentation for the Windows API Functions. You better think it over and ask again what you really want. And then ask a meaningful question.

cdkiller 26. Jul 2004 04:17

Re: PSDK - read defect sectors ?
 
yes i know that it is a documentation.

my question was about it.

how can i read defect sector with the win api functions ?

thanks.

Luckie 26. Jul 2004 13:49

Re: PSDK - read defect sectors ?
 
Zitat:

Zitat von cdkiller
how can i read defect sector with the win api functions ?

That's a meaningfull Question. :P.

I'd say no. You will have to access the HDD at really low level. API functions are still to high. Therefore you might need to write a device driver. And that is impossible with Delphi. You need Visual C by MS and the DDK also by MS.

w3seek 26. Jul 2004 14:03

Re: PSDK - read defect sectors ?
 
Zitat:

Zitat von cdkiller
how can i read defect sector with the win api functions ?

That's an oxymoron....how could you read sectors if they're broken? All you could do is trying to detect whether the sector is bad or not. But there's no high-level api for something like this, so you'd need to write a driver. I don't see a point in "copy protections" because you invest months/years in development and it's being cracked within only a few hours or days. Plus copy protection really is bugging your clients! If I were a software vendor, I wouldn't "protect" CDs/DVDs this way. Plus, unless sectors aren't physically broken, it doesn't make sense because you could always duplicate the disk. Oh, and note that you can't call a copy-protected medium "CD"!

Kernel32.DLL 26. Jul 2004 14:09

Re: PSDK - read defect sectors ?
 
You might find sth. at www.swissdelphicenter.com or swiss.torry.net

I'm sure that there is a unit, with which you can read defect sectors on a floppy. You just need to modify it a little bit (no problem with PSDK). I'am sure, that the source is posted in a comment...

I worked with that unit a long time ago but I lost it.

(If everyone would use google.de/google.com ) :roll:

Kernel32.DLL 27. Jul 2004 00:26

Re: PSDK - read defect sectors ?
 
Liste der Anhänge anzeigen (Anzahl: 1)
Well then...

Because I'm such a nice guy, I searched for the Unit in the dark in deeps of my HDD. And I found it!

But there are of course some things that must be modified,
like:

BYTESPERSECTOR: 512 <= only for a Floppy!


BTW: It's from swissdelphicenter.net written by Lemi


:drunken: Daniel

w3seek 27. Jul 2004 00:43

Re: PSDK - read defect sectors ?
 
This won't help you detecting physically "defect" sectors. And unless they're really physically defect, you can easily copy them with every cd/dvd clone utility...

Kernel32.DLL 27. Jul 2004 18:05

Re: PSDK - read defect sectors ?
 
What?

Of course you can detect physically defect sectors with this Unit. You'll never be able to read defect sectors.

I tried it by making a scratch on a CD and trying to read the sectors. As expected, it didn't work. But the Unit told me, how many sectors are damaged.

I think, this is what he wants, isn't it?


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:07 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz