edgardvaz Posted August 8, 2011 Report Share Posted August 8, 2011 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? Quote Link to comment Share on other sites More sharing options...
edgardvaz Posted August 8, 2011 Author Report Share Posted August 8, 2011 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? Quote Link to comment Share on other sites More sharing options...
Theotokos Posted August 8, 2011 Report Share Posted August 8, 2011 ****************** FUNCTION SERIAL_HD ****************** Local TDLL:=LoadLibrary("DiskSerial.dll"), RETPORTA1, lpBuffer:=SPACE(512) IF TDLL=0 RETURN("Erro na DLL") FreeLibrary( TDLL ) ENDIF RETPORTA1:=DLLCALL(TDLL,32,"GetSerialNumber",0,@lpBuffer ) FreeLibrary( TDLL ) RETURN(lpBuffer) Quote Link to comment Share on other sites More sharing options...
kapiaba Posted August 9, 2011 Report Share Posted August 9, 2011 // 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 Quote Link to comment Share on other sites More sharing options...
Dr_Microso Posted August 9, 2011 Report Share Posted August 9, 2011 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'> 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.