In xHarbour, these two function bypass the OS messages. I have not tested on Vista
1) DiskReady( cDisk, .F. )
2)
SetErrorMode(1)
IsDisk( cDisk )
I do not know if Harbour has similar functions
G. N. Rao.
Hyderabad, India
In xHarbour, these two function bypass the OS messages. I have not tested on Vista
1) DiskReady( cDisk, .F. )
2)
SetErrorMode(1)
IsDisk( cDisk )
I do not know if Harbour has similar functions
Hello NagesWaraRao,
thank you.
Yes, Set ErrorMode(1) with xHarbor is working.
local cDisk := "m"
// msginfo(DiskReady( cDisk, .F. ) )
Unresolved external '_HB_FUN_DISKREADY' referenced from
SetErrorMode(1)
msginfo(IsDisk( cDisk ) )
Regards,
Otto
Hello Otto
Why you don't use
nFile := fCreate( cDrive + 'TEST.TXT',0)
if nFile == -1
lReturn := FALSE
MsgInfo("Driver not present " )
else
fClose(nFile)
endif
Maurizio
Maurizio, with your code I get the same error msg.
Regards,
Otto
Otto,
> Antonio, the result is the same
Then the error may come from GetDriveType()
Otto wrote:Hello NagesWaraRao,
thank you.
Yes, Set ErrorMode(1) with xHarbor is working.
local cDisk := "m"
// msginfo(DiskReady( cDisk, .F. ) )
Unresolved external '_HB_FUN_DISKREADY' referenced from
SetErrorMode(1)
msginfo(IsDisk( cDisk ) )
Regards,
Otto
FUNCTION IsDrive (cDrive) // cDrive -> a:, c:, ....
LOCAL aDrv := aDrives()
RETURN (AScan (aDrv, cDrive)!=0)Hello Stefan, hello NagesWaraRao,
The aDrives-function executes the same exception dialog.
At the moment only xHarbour with ErrorMode(1) as NagesWaraRao suggested is working.
DiskReady( cDisk, .F. ) here gives a:
Unresolved external '_HB_FUN_DISKREADY' referenced from
But I don't use xHarbour in my project.
Regards,
Otto
Otto,
I have the same problem as you with Card readers.
How did you solve it?.
As this error, I have problems with protect.prg
thanks ![]()
Hello, if I remember well I have reinstalled the card reader.
Best regards,
Otto
Hi Entico,
Seterrormode and DiskReady() are only in xHarbour, but I use Harbour.
Thanks ![]()
It is called WAPI_SETERRORMODE() in Harbour.
EMG