Jump to content
Fivewin Brasil

Volume do disco


edgardvaz

Recommended Posts

Boa Noite !

No clipper uso o seguinte programa:

*---------------------------------------------------------------------------

FUNCTION MyVolSerial(par1)

*---------------------------------------------------------------------------

*par1 = C letra da unidade

*funcao = exibir numero de serie do volume, independente do windows utilizado

*uso MyVolSerial("C")

*---------------------------------------------------------------------------

local tela, string, vnumvol, tela1:=savescreen(00,00,24,79)

if empty(par1)=.t.

par1="C"

endif

*--limpa a tela antes

clear

*

volcomand="vol "+left(par1,1)+":"

*

run &volcomand

*

tela=savescreen(00,00,03,79)

clear

memowrit("and.txt",strtran(tela,chr(7),""))

string=memoread("and.txt",80)

*

ferase("and.txt")

*

restscreen(00,00,24,79,tela1)

*

vnvol := substr(string,at("-",string)-4,4)+substr(string,at("-",string),5)

return vnvol

Mas no fivewin este volume vem em branco.

Como fazer?

Link to comment
Share on other sites

Boa Noite !

No clipper uso o seguinte programa:

*---------------------------------------------------------------------------

FUNCTION MyVolSerial(par1)

*---------------------------------------------------------------------------

*par1 = C letra da unidade

*funcao = exibir numero de serie do volume, independente do windows utilizado

*uso MyVolSerial("C")

*---------------------------------------------------------------------------

local tela, string, vnumvol, tela1:=savescreen(00,00,24,79)

if empty(par1)=.t.

par1="C"

endif

*--limpa a tela antes

clear

*

volcomand="vol "+left(par1,1)+":"

*

run &volcomand

*

tela=savescreen(00,00,03,79)

clear

memowrit("and.txt",strtran(tela,chr(7),""))

string=memoread("and.txt",80)

*

ferase("and.txt")

*

restscreen(00,00,24,79,tela1)

*

vnvol := substr(string,at("-",string)-4,4)+substr(string,at("-",string),5)

return vnvol

Mas no fivewin este volume vem em branco.

Como fazer?

Link to comment
Share on other sites


// Returns the serial number of the harddisk !!!

// Use it for copy-protection !!!

//----------------------------------------------------------------------------//

function Main()

MsgInfo( "HardDisk serial number: " + Str( nSerialHD() ) )

return nil

//----------------------------------------------------------------------------//

// FiveWin new nSerialHD() number to check a HardDisk serial number

//----------------------------------------------------------------------------//

function Main()

MsgInfo( nSerialHD() ) // Check default drive

MsgInfo( nSerialHD( "C:\" ) ) // Serial number on HardDisk

MsgInfo( nSerialHD( "D:" ) )

MsgInfo( nSerialHD( "A:" ) )

if IsDiskette()

MsgInfo( nSerialA() ) // Serial number on drive A

endif

return nil

//----------------------------------------------------------------------------//

id=code>id=code>

João Santos - São Paulo.

kmt_karinha@pop.com.br

joao@pleno.com.br

Fone: (11) 3106-2832 / 8243-5632 - TIM

FWH 2.7 - xHARBOUR WorkShop.Exe

dentinho.jpg?rnd=0.830315402649066

Link to comment
Share on other sites

Se o foco é a proteção do software...

http://www.fivewin.com.br/forum/topic.asp?TOPIC_ID=18672

&

http://sqllib.com.br/blog/index.php?blog=7&title=obtendo_infomacoes_do_hardware_atual_com&more=1&c=1&tb=1&pb=1

Um abraço!

id='Tahoma'>

16ledc3.jpg

xBase-derivações(CA-Clipper, fw, hb, xhb, VxHb...)/Object Pascal(Delphi 7)

"O sábio nem sempre diz tudo o que sabe, o tolo muitas vezes não sabe o que diz!" - Lao Tsé

dr.microso@hotmail.com

Editado por - Dr_Microso on 09/08/2011 13:10:05

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...