Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I built a file requester...
#1
Ok guys, I know have a personal grudge with QB 7.1. After looking through
100s of file requester routines developed by 'brilliant' programmers, I
took it upon myself to code a great file requester that should work on all
comps. So here it is. The only problem that I am facing right now is what
value should I put in the CX register to get only files or only directories.

TYPE FType
reserved AS STRING * 20
Attribute AS STRING * 1
CreateTime AS INTEGER
CreateDate AS INTEGER
FileSize AS LONG
FileName AS STRING * 13
END TYPE

DIM DTA AS FType
DIM inregs AS regtypex
DIM outregs AS regtypex
DIM FlName AS STRING
DIM DirName AS STRING

CONST ATTR = 16

CLS

FlName = "C:\*.*" + CHR$(0)

inregs.ax = &H1A00
inregs.ds = VARSEG(DTA)
inregs.dx = VARPTR(DTA)
interruptx &H21, inregs, outregs

inregs.ax = &H4E00
inregs.ds = SSEG(FlName)
inregs.dx = SADD(FlName)
inregs.cx = ATTR
interruptx &H21, inregs, outregs

PRINT outregs.ax
PRINT outregs.flags
DO
i% = i% + 1
DTA.FileName = ""
inregs.ax = &H4F00
inregs.cx = ATTR
interruptx &H21, inregs, outregs
PRINT DTA.FileName
SLEEP
LOOP UNTIL outregs.ax <> 0
PRINT i%
Reply


Messages In This Thread
I built a file requester... - by TheBigBasicQ - 06-04-2003, 07:59 PM
I built a file requester... - by Plasma - 06-04-2003, 10:13 PM
Thanx... - by TheBigBasicQ - 06-07-2003, 11:02 PM
I built a file requester... - by Plasma - 06-08-2003, 06:43 AM
OOPS! - by TheBigBasicQ - 06-08-2003, 10:37 AM
Re: Thanx... - by relsoft - 06-09-2003, 09:04 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)