🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
7 messages
7 total messages Started by MR Sun, 31 Dec 2006 01:10
How to get unique harddisk-id?
#2821
Author: MR
Date: Sun, 31 Dec 2006 01:10
20 lines
1364 bytes
How to get unique harddisk-id?

I've read each harddisk has an id stored in it which has nothing to do
with it's partitions and is not concerned when changing the disk's
partitions, formating, etc.

I can get this Id with a harddisk-tool (e.g. Paragons Harddisk
Manager).

How can I read it from inside my application?
Using GetVolumeInformation() seems *not* to be the right way, because
it just delivers the IDs from the partitions and it's result is
different for each partition on a single harddisk (and it is also
different from the harddisk-id a harddisk-tool (see above) delivers.


Thanks a lot,

Michael
Re: How to get unique harddisk-id?
#2822
Author: Bob Gonder
Date: Sun, 31 Dec 2006 03:45
6 lines
1060 bytes
<MR> wrote:

>How to get unique harddisk-id?

How about this (found via Google)
http://www.winsim.com/diskid32/diskid32.html
Re: How to get unique harddisk-id?
#2823
Author: MR
Date: Sun, 31 Dec 2006 07:40
22 lines
1373 bytes
Bob Gonder <notbg@notmindspring.invalid> schrieb:

><MR> wrote:
>
>>How to get unique harddisk-id?
>
>How about this (found via Google)
>http://www.winsim.com/diskid32/diskid32.html
>
Ok, trying  to compile it as a first step, I finally get an
compiler-error 

Invalid combination of opcode and operands at the line

      _asm Call FWORD PTR [CallgateAddr]

Not familiar with ASM, what would be a valid modification for BDS?


Thanks,

Mihcael
Re: How to get unique harddisk-id?
#2824
Author: Bob Gonder
Date: Sun, 31 Dec 2006 14:17
20 lines
1579 bytes
<MR> wrote:

>      _asm Call FWORD PTR [CallgateAddr]

That line is missing a semicolon ;

>Not familiar with ASM, what would be a valid modification for BDS?

What is the definition of CallgateAddr ?
What is the definition of FWORD ?


Other assumed options:
	asm{
		call	[CallgateAddr];
or
		call	dword ptr [CallgateAddr];
or
		call	DWORD PTR [CallgateAddr];
	};
Re: How to get unique harddisk-id?
#2825
Author: Vladimir Stefanovic
Date: Sun, 31 Dec 2006 15:53
11 lines
1257 bytes
You do not need ASM for getting HD serial number.

This is what you need:
http://www.winsim.com/diskid32/diskid32.cpp

I suppose you've downloadd wrong CPP.


-- 
Best Regards,
Vladimir Stefanovic
Re: How to get unique harddisk-id?
#2836
Author: MR
Date: Fri, 05 Jan 2007 15:09
26 lines
1631 bytes
Bob Gonder <notbg@notmindspring.invalid> schrieb:

><MR> wrote:
>
>>      _asm Call FWORD PTR [CallgateAddr]
>
>That line is missing a semicolon ;

Seems to have no influence...
>
>>Not familiar with ASM, what would be a valid modification for BDS?
>
>What is the definition of CallgateAddr ?

CallgateAddr is defined as 
  WORD CallgateAddr[3];

>What is the definition of FWORD ?
And FWORD is not defined at all by Borland *using grep), but looking
around in the net it seems to be defined by MS as 6 Byte
http://flatassembler.net/docs.php?article=manual|).
Can I define it by myself? How?

Thanks,

Michael
Re: How to get unique harddisk-id?
#2687
Author: MR
Date: Fri, 05 Jan 2007 15:11
14 lines
1292 bytes
"Vladimir Stefanovic" <antivari@po.sbb.co.yu> schrieb:

>You do not need ASM for getting HD serial number.
>
>This is what you need:
>http://www.winsim.com/diskid32/diskid32.cpp
>
>I suppose you've downloadd wrong CPP.

Yes, I seem to have downloaded the old one from 2000)

Thanks,

Michael
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads