》subst与注册表无关, 也与DLL无关啊!<br>老兄,太绝对了。虽然SUBST是DOS时代的东东,但在Win环境下,这些程序是重新写的,<br>用DLL来实现也很合理,实际上MSDN里就明确地说:<br><br>ULIB.DLL Provides support for commands: DISKCOPY, SUBST, DOSKEY,<br> ACLCONV, CHCP, KEYB, CONVERT, MODE, XCOPY, REPLACE,<br> MORE, PRINT, RECOVER, COMP, FC, CHKDSK, FIND, TREE,<br> SORT, DISKCOMP, ATTRIB, FORMAT, etc.<br><br>与注册表好像是真的无关,我以各种形式在注册表里查找 SUBSTed 信息都没结果。<br><br>__________<br><br>我查了一下以前用TP5写的程序,调用DOS 60h就可以获得给定路径的真实路径:<br>function ExpandPath(Var SPath,DPath:String):Boolean;<br> Assembler; Asm<br> push ds<br> lds dx, SPath<br> call StrToASCZ<br> mov ah, 60h<br> lds si, SPath<br> les di, DPath<br> int 21h<br> jc @@1 {error}<br> call ASCZtoStr<br> mov al, 1<br> jmp @@2<br> @@1:<br> mov al, 0<br> @@2:<br> pop ds<br> end;{ExpandPath}<br>但我不知道现在的汇编怎么个写法,哪位仁兄可否搞整过来试一试。<br><br>_________<br><br>MSDN介绍71AA 00-02 三个功能是专门处理 SUBST 的,但都是实模式的汇编:<br><br>mov ax, 71aah ; SUBST<br>mov bh, 2 ; Query SUBST<br>mov bl, DriveNum ; see below<br>mov dx, seg PathName ; see below<br>mov ds, dx<br>mov dx, offset PathName <br>int 21h<br><br>jc error<br><br>还有7160的三个功能也与SUBST有关。<br><br>