Discussion:
DriveStatus Pb
jpmesnage
2003-08-31 16:52:31 UTC
Permalink
Larry,
I get problem with the following script.

"Trace.log" must not exist too reproduce the pb

I write thru Yahoo because we (Jon and I) can reach you directly by
email.

Thanks for debugging what it's happening
JP

'------------------- script to reproduce -------
FileDelete ( "Trace.log" )


$drv= "c:"
$s=DriveStatus($drv)
msgbox(0,$drv, $s)
$drv= "c:"
$s=DriveStatus($drv)
msgbox(0,$drv, $s)



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/EGnolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
AutoItList-***@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Larry Keys
2003-08-31 17:30:34 UTC
Permalink
Post by jpmesnage
'------------------- script to reproduce -------
FileDelete ( "Trace.log" )
$drv= "c:"
$s=DriveStatus($drv)
msgbox(0,$drv, $s)
$drv= "c:"
$s=DriveStatus($drv)
msgbox(0,$drv, $s)
I get 2 message boxes with the title "c:" and text "READY"

Larry


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/EGnolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
AutoItList-***@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Support
2003-08-31 17:43:02 UTC
Permalink
I get UNKNOWN, followed by READY


J
Post by Larry Keys
Post by jpmesnage
'------------------- script to reproduce -------
FileDelete ( "Trace.log" )
$drv= "c:"
$s=DriveStatus($drv)
msgbox(0,$drv, $s)
$drv= "c:"
$s=DriveStatus($drv)
msgbox(0,$drv, $s)
I get 2 message boxes with the title "c:" and text "READY"
Larry
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/EGnolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
AutoItList-***@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Support
2003-08-31 17:55:54 UTC
Permalink
Think I found it:

The code we have is:
if ( !(bRet = GetDiskFreeSpaceEx(sTemp.c_str(),&uiFree,&uiTotal,&uiUsed))
|| nFlag==2 )
test = GetLastError();

(nFlag = 2 is the DriveStatus func)

This means that GetLastError will be done if there is an error OR
DriveStatus was used. In the case of success (usual) the LAST windows
error will actually have been in the FileDelete code, GetGetDiskFree
obviously doesn't Set the last error on success. I think getting rid of
the "|| nFlag = 2" should do the trick.
Post by Larry Keys
Post by jpmesnage
'------------------- script to reproduce -------
FileDelete ( "Trace.log" )
$drv= "c:"
$s=DriveStatus($drv)
msgbox(0,$drv, $s)
$drv= "c:"
$s=DriveStatus($drv)
msgbox(0,$drv, $s)
I get 2 message boxes with the title "c:" and text "READY"
Larry
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/EGnolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
AutoItList-***@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Larry Keys
2003-08-31 20:02:13 UTC
Permalink
When I write a line of code like that... I step back and look at it
and remark... piss, I dunno, looks complicated enough to work... :p

Larry
Post by Support
if ( !(bRet = GetDiskFreeSpaceEx(sTemp.c_str
(),&uiFree,&uiTotal,&uiUsed))
Post by Support
|| nFlag==2 )
test = GetLastError();
(nFlag = 2 is the DriveStatus func)
This means that GetLastError will be done if there is an error OR
DriveStatus was used. In the case of success (usual) the LAST
windows
Post by Support
error will actually have been in the FileDelete code,
GetGetDiskFree
Post by Support
obviously doesn't Set the last error on success. I think getting rid of
the "|| nFlag = 2" should do the trick.
Post by Larry Keys
Post by jpmesnage
'------------------- script to reproduce -------
FileDelete ( "Trace.log" )
$drv= "c:"
$s=DriveStatus($drv)
msgbox(0,$drv, $s)
$drv= "c:"
$s=DriveStatus($drv)
msgbox(0,$drv, $s)
I get 2 message boxes with the title "c:" and text "READY"
Larry
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/EGnolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
AutoItList-***@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
David Nuttall
2003-09-02 16:34:56 UTC
Permalink
I fixed DriveGetDrive() over the weekend. If the current directory for a drive
is not root, it would fail on Win98. I fixed it by forcing it to look at root.
I will submit tommorow. I wonder if this is the same problem here.

David
Post by Support
if ( !(bRet = GetDiskFreeSpaceEx(sTemp.c_str(),&uiFree,&uiTotal,&uiUsed))
|| nFlag==2 )
test = GetLastError();
(nFlag = 2 is the DriveStatus func)
This means that GetLastError will be done if there is an error OR
DriveStatus was used. In the case of success (usual) the LAST windows
error will actually have been in the FileDelete code, GetGetDiskFree
obviously doesn't Set the last error on success. I think getting rid of
the "|| nFlag = 2" should do the trick.
Post by Larry Keys
Post by jpmesnage
'------------------- script to reproduce -------
FileDelete ( "Trace.log" )
$drv= "c:"
$s=DriveStatus($drv)
msgbox(0,$drv, $s)
$drv= "c:"
$s=DriveStatus($drv)
msgbox(0,$drv, $s)
I get 2 message boxes with the title "c:" and text "READY"
Larry
______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/EGnolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
AutoItList-***@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Larry
2003-09-02 16:42:13 UTC
Permalink
Jon may have gotten this one already, I think, you know posts were
all messed up over the weekend...

Larry
Post by David Nuttall
I fixed DriveGetDrive() over the weekend. If the current
directory for a drive
Post by David Nuttall
is not root, it would fail on Win98. I fixed it by forcing it to look at root.
I will submit tommorow. I wonder if this is the same problem
here.
Post by David Nuttall
David
Post by Support
if ( !(bRet = GetDiskFreeSpaceEx(sTemp.c_str
(),&uiFree,&uiTotal,&uiUsed))
Post by David Nuttall
Post by Support
|| nFlag==2 )
test = GetLastError();
(nFlag = 2 is the DriveStatus func)
This means that GetLastError will be done if there is an error OR
DriveStatus was used. In the case of success (usual) the LAST windows
error will actually have been in the FileDelete code,
GetGetDiskFree
Post by David Nuttall
Post by Support
obviously doesn't Set the last error on success. I think
getting rid of
Post by David Nuttall
Post by Support
the "|| nFlag = 2" should do the trick.
Post by Larry Keys
Post by jpmesnage
'------------------- script to reproduce -------
FileDelete ( "Trace.log" )
$drv= "c:"
$s=DriveStatus($drv)
msgbox(0,$drv, $s)
$drv= "c:"
$s=DriveStatus($drv)
msgbox(0,$drv, $s)
I get 2 message boxes with the title "c:" and text "READY"
Larry
_____________________________________________________________________
_
Post by David Nuttall
Post your free ad now! http://personals.yahoo.ca
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/EGnolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
AutoItList-***@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
David Nuttall
2003-09-02 16:44:44 UTC
Permalink
Post by Larry
Jon may have gotten this one already, I think, you know posts were
all messed up over the weekend...
Larry
Post by David Nuttall
I fixed DriveGetDrive() over the weekend. If the current
directory for a drive
Post by David Nuttall
is not root, it would fail on Win98. I fixed it by forcing it to
look at root.
Post by David Nuttall
I will submit tommorow. I wonder if this is the same problem
here.
Post by David Nuttall
David
I do now. I was away for the Labour Day weekend. Man did my mailbox fill up.

Dave

______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/EGnolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
AutoItList-***@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Loading...