Volume Serial Number

53 views
Skip to first unread message

Com1 Software

unread,
Oct 21, 2010, 12:17:55 PM10/21/10
to Harbour Users
Hello all,

Any suggestions on how to get the volume serial number of a drive
using harbour in a text based application.

Any advice is most appreciated Thanks,
Dave

Qatan

unread,
Oct 21, 2010, 1:37:48 PM10/21/10
to harbou...@googlegroups.com
Hello Dave,

Try volserial() function.

Qatan

> --
> You received this message because you are subscribed to the Google
> Groups "Harbour Users" group.
> Unsubscribe: harbour-user...@googlegroups.com
> Web: http://groups.google.com/group/harbour-users

Com1 Software

unread,
Oct 21, 2010, 2:46:50 PM10/21/10
to Harbour Users
Qatan,

Getting:

Error: Unresolved external '_HB_FUN_VOLSERIAL'

I am using BCC libs in text mode program. I thought voserial() was
part of mingw.

I have all my harbour exe, libs, includes and programs in single test
folder to be safe.

Thanks much,
Dave

Qatan

unread,
Oct 21, 2010, 4:12:40 PM10/21/10
to harbou...@googlegroups.com
Hello Dave,

I do not use BCC but it is not the problem here.
You should type: hbmk2 your_program -lhbct
This will compile your_program.prg and will add lib CT (former CA-Tools
Lib).

Com1 Software

unread,
Oct 21, 2010, 3:23:02 PM10/21/10
to Harbour Users
Qatan,

That works great.

Thanks for all your help.

Dave

On Oct 21, 4:12 pm, "Qatan" <wanstad...@gmail.com> wrote:
> Hello Dave,
>

Guillermo Varona Silupú

unread,
Oct 21, 2010, 3:56:59 PM10/21/10
to harbou...@googlegroups.com
Hi Qatan:
This code:
*****************************
Function Main
? VOLSERIAL()
RETURN

*************************************
Output In WinXP SP3:
************************************************
C:\harbour>d:\hrbmingw\bin\hbmk2 tstgvs -lhbct
hbmk2: Processing environment options: -compiler=mingw
Harbour 2.1.0beta2 (Rev. 15515)
Copyright (c) 1999-2010, http://harbour-project.org/
Compiling 'tstgvs.prg'...
Lines 29, Functions/Procedures 1
Generating C source output to
'C:\DOCUME~1\gvaronas\CONFIG~1\Temp\hbmk_lx3nsn.dir\tstgvs.c'... Done.

C:\harbour>tstgvs

142082031

C:\harbour>

**********************************************************
In Ubuntu 9.10:
**********************************************************
guillermo@deyp02:~/harbour$ /home/guillermo/hrbMinGW/bin/hbmk2
tstgvs.prg -lhbct
Harbour 2.1.0beta2 (Rev. 15521)
Copyright (c) 1999-2010, http://harbour-project.org/
Compiling 'tstgvs.prg'...
Lines 29, Functions/Procedures 1
Generating C source output to '/tmp/hbmk_npmnwp.dir/tstgvs.c'... Done.

guillermo@deyp02:~/harbour$ ./tstgvs

-1

**************************************************************
Any TIP?

TIA

BestRegards
GVS

Qatan

unread,
Oct 21, 2010, 8:49:55 PM10/21/10
to harbou...@googlegroups.com
Hello Guillermo,

There is not such a thing like VolSerial() in Linux but I think there is
at least one alternative (or many)...
Sorry, I do not have anyway to test here (just have Window XP).
Try to look for any alternative on Google. I found this one that looked
interesting, maybe it could be used or even implemented in Harbour.

Qatan

Guillermo Varona Silupú

unread,
Oct 21, 2010, 9:18:04 PM10/21/10
to harbou...@googlegroups.com
El 21/10/2010 07:49 p.m., Qatan escribi�:

> Hello Guillermo,
>
> There is not such a thing like VolSerial() in Linux but I think
> there is at least one alternative (or many)...
> Sorry, I do not have anyway to test here (just have Window XP).
> Try to look for any alternative on Google. I found this one that
> looked interesting, maybe it could be used or even implemented in
> Harbour.
Ok.
Thank you very much

BestRegards
GVS

Com1 Software

unread,
Oct 21, 2010, 9:32:44 PM10/21/10
to Harbour Users


On Oct 21, 9:18 pm, Guillermo Varona Silupú <gvar...@ec-red.com>
wrote:

Qatan

unread,
Oct 21, 2010, 10:43:00 PM10/21/10
to harbou...@googlegroups.com
Hello Guillermo,

Sorry, I forgot to put the link:
http://cboard.cprogramming.com/linux-programming/116979-equivalent-volume-serial-number-linux.html

Qatan

----- Original Message -----
From: "Guillermo Varona Silup�" <gva...@ec-red.com>
To: <harbou...@googlegroups.com>
Sent: Thursday, 21 de October de 2010 22:18
Subject: Re: [harbour-users] Re: Volume Serial Number

BestRegards
GVS

--

apolinar

unread,
Oct 22, 2010, 2:41:43 AM10/22/10
to Harbour Users
Reply all
Reply to author
Forward
0 new messages