Board index » cppbuilder » write a long word on the hard disk

write a long word on the hard disk

Hi All.

How can i write a long word value or other data, directly on the Hd?
(without create a file)

Thanx

 

Re:write a long word on the hard disk


On Tue, 1 Jul 2003 21:15:56 +0200, "Marcello Scala"

Quote
<marcello.sc...@email.it> wrote:
>Hi All.

>How can i write a long word value or other data, directly on the Hd?
>(without create a file)

You cannot - at least not in any way which makes sense. Windows
accesses everything from HDs as files, so you have to adapt to it.
BTW, how do you plan to retrieve your data if not as a file?
I am afraid you will have to
- open a file
- write your data
- possibly do mre stuff with the file and
- close the file.
If you tell us what kind of problem you are trying to solve, you might
get different answers.
HTH
Helmut Giese

Re:write a long word on the hard disk


i say with a low level access to hd. (i want write on a single track).

How can i do it?

"Helmut Giese" <hgi...@ratiosoft.com> ha scritto nel messaggio
news:3f01e80d.936206@forums.borland.com...

Quote
> On Tue, 1 Jul 2003 21:15:56 +0200, "Marcello Scala"
> <marcello.sc...@email.it> wrote:

> >Hi All.

> >How can i write a long word value or other data, directly on the Hd?
> >(without create a file)
> You cannot - at least not in any way which makes sense. Windows
> accesses everything from HDs as files, so you have to adapt to it.
> BTW, how do you plan to retrieve your data if not as a file?
> I am afraid you will have to
> - open a file
> - write your data
> - possibly do mre stuff with the file and
> - close the file.
> If you tell us what kind of problem you are trying to solve, you might
> get different answers.
> HTH
> Helmut Giese

Re:write a long word on the hard disk


On Tue, 1 Jul 2003 23:18:31 +0200, "Marcello Scala"

Quote
<marcello.sc...@email.it> wrote:
>i say with a low level access to hd. (i want write on a single track).

>How can i do it?

Sorry, I don't know - and I would like to warn you from attempting to
do so. You will simply risk to damage Windows file system, which can
lead to corrupted files up to system crashes. Only virusses would
attempt something similar IMO (but my imagination is limited - maybe
you've got a legitimate reason for what you're after). Personally, I
wouldn't even think of fiddling with the file system behind Window's
back. I don't believe your users will appreciate what you're after.
Best regards
Helmut Giese

Re:write a long word on the hard disk


See if this article is any help:

INFO: Direct Drive Access Under Win32
http://support.microsoft.com/support/kb/articles/Q100/0/27.asp

Note that if you do direct disk I/O it is possible to ruin the disk
configuration, ending up loosing one or more files or having to reformat or
repartition with the loss of all data.

.  Ed

Quote
> Marcello Scala wrote in message
> news:3f01de25@newsgroups.borland.com...

> How can i write a long word value or other data, directly on
> the Hd? (without create a file)

Re:write a long word on the hard disk


Hi,

Quote
"Marcello Scala" <marcello.sc...@email.it> wrote:
>Hi All.

>How can i write a long word value or other data, directly on the Hd?
>(without create a file)

I always was sure that minimal size of data for writing
on disk it is size of sector (512 Bytes).
And boundary for writing is sector also.
Direct writing can give you unpredictable result.

Vladimir.

Re:write a long word on the hard disk


Long Word is the data type and not the size.
I must write a number directly on hd without create a file.
It's a program protection.

"Vladimir Afanasyev" <a...@systema.kiev.ua> ha scritto nel messaggio
news:3f028171$1@newsgroups.borland.com...

Quote

> Hi,

> "Marcello Scala" <marcello.sc...@email.it> wrote:
> >Hi All.

> >How can i write a long word value or other data, directly on the Hd?
> >(without create a file)

> I always was sure that minimal size of data for writing
> on disk it is size of sector (512 Bytes).
> And boundary for writing is sector also.
> Direct writing can give you unpredictable result.

> Vladimir.

Re:write a long word on the hard disk


Vladimir Afanasyev,

Quote
> I always was sure that minimal size of data for writing
> on disk it is size of sector (512 Bytes).

Yes, sometimes larger.
--
Andrue Cope
[Bicester, UK]

Re:write a long word on the hard disk


Marcello Scala,

Quote
> i say with a low level access to hd. (i want write on a single track).

Not possible. Modern disks are not accessed using heads/sectors/tracks
but instead are accessed by specifying a Physical Sector Number. They
/can/ be accessed using C:H:S but even then internally it's anyone guess
where the data actually gets written.
--
Andrue Cope
[Bicester, UK]

Re:write a long word on the hard disk


How can i do it?

"Andrue Cope" <not.a.va...@email.address.sorry> ha scritto nel messaggio
news:VA.00001da1.09274f33@email.address.sorry...

Quote
> Marcello Scala,

> > i say with a low level access to hd. (i want write on a single track).

> Not possible. Modern disks are not accessed using heads/sectors/tracks
> but instead are accessed by specifying a Physical Sector Number. They
> /can/ be accessed using C:H:S but even then internally it's anyone guess
> where the data actually gets written.
> --
> Andrue Cope
> [Bicester, UK]

Re:write a long word on the hard disk


Quote
"Marcello Scala" <marcello.sc...@email.it> wrote:
>Long Word is the data type and not the size.
>I must write a number directly on hd without create a file.

And because it isn't part of a file, the OS doesn't know it's in use,
and overwrites it later ...

Andrue knows what he's talking about - he works with disc recovery.

Alan Bellingham
--
al...@episys.com

Re:write a long word on the hard disk


Sorry Guys.

I want marked with a Serial number on Hd (with random position), how can i
do it?

(i have tried to use a Serial HD but is easy to modify).

This is a simple protection for my software.

"Alan Bellingham" <al...@episys.com> ha scritto nel messaggio
news:su75gvgr7giahhtf5k824mu2srl80uu0vc@4ax.com...

Quote
> "Marcello Scala" <marcello.sc...@email.it> wrote:

> >Long Word is the data type and not the size.
> >I must write a number directly on hd without create a file.

> And because it isn't part of a file, the OS doesn't know it's in use,
> and overwrites it later ...

> Andrue knows what he's talking about - he works with disc recovery.

> Alan Bellingham
> --
> al...@episys.com

Re:write a long word on the hard disk


Sorry for my bad english:

Quote
> I want marked with a Serial number on Hd (with random position), how can i
> do it?

I want write on Hd a simple serial number (with a random position) how can i
do this?

:)
Maybe now is mooooore correct! (i hope)

(with the real serial hd is not good because is it easy to modify)

"Marcello Scala" <marcello.sc...@email.it> ha scritto nel messaggio
news:3f02b218$1@newsgroups.borland.com...

Quote
> Sorry Guys.

> I want marked with a Serial number on Hd (with random position), how can i
> do it?

> (i have tried to use a Serial HD but is easy to modify).

> This is a simple protection for my software.

> "Alan Bellingham" <al...@episys.com> ha scritto nel messaggio
> news:su75gvgr7giahhtf5k824mu2srl80uu0vc@4ax.com...
> > "Marcello Scala" <marcello.sc...@email.it> wrote:

> > >Long Word is the data type and not the size.
> > >I must write a number directly on hd without create a file.

> > And because it isn't part of a file, the OS doesn't know it's in use,
> > and overwrites it later ...

> > Andrue knows what he's talking about - he works with disc recovery.

> > Alan Bellingham
> > --
> > al...@episys.com

Re:write a long word on the hard disk


Try creating a hidden system file which contains the data you want.
HTH Pete

Quote
"Marcello Scala" <marcello.sc...@email.it> wrote in message

news:3f02b218$1@newsgroups.borland.com...
Sorry Guys.

I want marked with a Serial number on Hd (with random position), how can i
do it?

(i have tried to use a Serial HD but is easy to modify).

This is a simple protection for my software.

Re:write a long word on the hard disk


Quote
Andrue Cope <not.a.va...@email.address.sorry> wrote:
>Vladimir Afanasyev,

>> I always was sure that minimal size of data for writing
>> on disk it is size of sector (512 Bytes).

>Yes, sometimes larger.
>--

I know it.
It was time when I take part in developing controller of HDD.
But thinked, may be now something changed.
Vladimir.
Go to page: [1] [2]

Other Threads