Search found 42 matches: cdrive

Return to advanced search

Robert, >Does somebody know how to check that network drive is connected? Try this: //--- Is drive ready? FUNCTION ISREADY( cDrive ) LOCAL cCurPath := CURDRIVE() + ":\" + CURDIR() LOCAL lReady := LCHDIR( cDrive + "." ) lSuccess:=.f. IF lReady LCHDIR( cCurPath ) lSuccess:= .T. ENDIF ...
by James Bott
Mon Mar 31, 2008 6:47 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to check if a drive exists
Replies: 36
Views: 7346

Try:

lisDir( cDrive +":\" )

Or, make it into a function:

function isDrive( cDrive )
return lisDir( cDrive +":\")

James
by James Bott
Mon Mar 31, 2008 6:07 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: How to check if a drive exists
Replies: 36
Views: 7346

Se for em FIVEWIN, melhor assim:

//-> cDrive := Disco // A: B: C: D: etc
Code: Select all  Expand view
        nSpace  := DISKSPACE(ASC(LEFT(cDrive,1)) - 64)
//
        lUltimo := IF(DISKSPACE(ASC(cDrive) - 64) > 0,.T.,.F.)
by karinha
Wed Feb 27, 2008 7:34 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: HB_DISKSPACE() - Não funciona com xharb 1.1.0???
Replies: 1
Views: 402

Antonio,

Remove ".and. GetDriveType( cDrive ) == DRIVE_REMOVABLE" in fwh\samples\protect.prg, or check with other constants there
by Antonio Linares
Sun Jan 20, 2008 7:12 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: nSerialHD question
Replies: 5
Views: 1057

To get the USB pendrive is as easy as (in the above code):

MsgInfo( "USB pendrive: " + CRLF + cDrive, nSerialHD( cDrive ) )

Getting closer to have our own based USB pendrive copy protection system... :-)
by Antonio Linares
Mon Nov 12, 2007 11:08 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: Software Protection
Replies: 33
Views: 7096

Ola Elmo...

Local cDrive

oDisk := TDiskInfo():New( cDrive )
oDisk:TDIVer()

Usando assim, retorna vazio, no mostra la version.

O que y estou fazendo errado ?

Saludos
by Ale SB
Fri Aug 10, 2007 11:39 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: SOS cual es el nombre del disco
Replies: 7
Views: 2404

aca esta el tdiskinfo.prg

... NUMERIC DATA nUsedSpace AS NUMERIC DATA nSBCluster AS NUMERIC DATA nFreeSpace AS NUMERIC DATA nTotalSpace AS NUMERIC DATA cLabel AS CHARACTER DATA cDrive AS CHARACTER DATA cNumSerie AS CHARACTER DATA cDriveType AS CHARACTER DATA cFileSystem AS CHARACTER METHOD New( cDrive ) CONSTRUCTOR METHOD TDIVer() ...
by elmoiquique
Thu Aug 09, 2007 6:29 pm
 
Forum: FiveWin para Harbour/xHarbour
Topic: SOS cual es el nombre del disco
Replies: 7
Views: 2404

El cDrive es la unidad de disco que necesitas la informacion

oDisk := TDiskInfo():New( cDrive ) oDisk:TDIVer() label:=oDisk:Label() //Etiqueta drive:=oDisk:Drive() //Unidad dtype:=oDisk:DriveType() //Tipo de Unidad nserie:=oDisk:NumSerie() //Numero de Serie sarchivo:=oDisk:FileSystem() //Sistema ...
by elmoiquique
Sat Aug 04, 2007 12:10 am
 
Forum: FiveWin para Harbour/xHarbour
Topic: SOS cual es el nombre del disco
Replies: 7
Views: 2404

... it works perfectly on mapped drives also. I am reproducing the test program below: #include "fivewin.ch" //////////////////////// FUNCTION Main( cDrive ) LOCAL nSerial local cHex DEFAULT cDrive := "C:" nSerial := nSerialHD(cDrive) cHex := L2HEX(nSerial) cHex := LEFT(cHex,4) + "-" +RIGHT(cHex,4) ...
by James Bott
Mon May 21, 2007 9:42 pm
 
Forum: FiveWin for Harbour/xHarbour
Topic: nSerialHD with UNC-Notation?
Replies: 4
Views: 1775

... in respect of nSerialHd() This is the code I used for testing nSerialHd(). #include "fivewin.ch" FUNCTION Main() LOCAL cSerialNos := "", cDrive, n, nSerial, aDrives cSerialNos += "Default Drive Serial No."+STR(nSerialHD())+CRLF+CRLF aDrives := aDrives() FOR n = 1 TO LEN(aDrives) cDrive ...
by RAMESHBABU
Sun Oct 01, 2006 6:54 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: protection EXE file
Replies: 24
Views: 13636

Ramesh,

FiveWin 16 bits provides nSerialHD( [<cDrive>] )
by Antonio Linares
Thu Sep 28, 2006 7:04 am
 
Forum: FiveWin for CA-Clipper
Topic: How to find Serial No. of a HDD in CA-Clipper?
Replies: 4
Views: 1472

.Lnk for FWH

... :Save() END ENDIF CATCH oError // END // RETURN ( oError = NIL ) //**** FUNCTION MapToNextDrive( cShare ) //**** LOCAL i, cDrive, lDone := .F., WshNetwork // TRY WshNetwork := CreateObject( "WScript.Network" ) cRealShare := "\" + STRTRAN( cShare, "\SP\FENIX2K", "" ) cShare ...
by sperceptivas
Tue Jul 04, 2006 5:30 am
 
Forum: FiveWin for Harbour/xHarbour
Topic: Shortcut (*.lnk) from FWH
Replies: 12
Views: 4832
Previous

Return to advanced search