home *** CD-ROM | disk | FTP | other *** search
- page ,132
-
- comment !
- * server extension version of c-tree server
- * application interface asm support
- *
- * This program is the CONFIDENTIAL and PROPRIETARY property
- * of FairCom(R) Corporation. Any unauthorized use, reproduction or
- * transfer of this program is strictly prohibited.
- *
- * Copyright (c) 1987, 1988, 1989 FairCom Corporation
- * (Subject to limited distribution and
- * restricted disclosure only.)
- * *** ALL RIGHTS RESERVED ***
- *
- * 4006 West Broadway
- * Columbia, MO 65203
- *
- *
- * c-tree(R) Version 4.3
- * Release C
- * February 7, 1989 17:30
- *
- !
-
-
- include asm.inc
-
-
-
- ;----------------------------------------------------------------
- ;UCOUNT get_redir_entry(ndx,netnamebuf,devnamebuf,tid,maxsz,ses)
- ;----------------------------------------------------------------
- ;UCOUNT ndx; /* redirection index */
- ;UTEXT far *netnamebuf; /* where to ret "\\servername\resource" */
- ;UTEXT far *devnamebuf; /* where to ret name of redirected device */
- ;UCOUNT far *tid; /* where to ret connect id */
- ;UCOUNT far *maxsz; /* where to ret max msg size */
- ;UCOUNT far *ses; /* where to ret session number */
- ;
- ;returns 0 if no error, else dos error code
- ;err code 18 is returned on end-of-list
- ;
- ;this is done in asm lang instead of c because the intdosx function
- ;in the library doesn't support passingh parms in the bp register
- ;
- ;note: dos call 5f05 is same as 5f02 plus, on return:
- ; ax = tree connect id
- ; dx = max size of smb message
- ; bp = netbios session for connection
- ;
- ;----------------------------------------------------------------
-
- ;parms on stack
- __ndx = 6
- __netnamebuf = 8
- __devnamebuf = 12
- __tid = 16
- __maxsz = 20
- __ses = 24
-
-
- public _get_redir_entry
- _get_redir_entry proc far
- push bp
- mov bp,sp
- PUSHM <si,di,ds>
- lds si,DWO [bp+__devnamebuf]
- les di,DWO [bp+__netnamebuf]
- mov bx,[bp+__ndx]
- push bp
- mov ax,5f05h
- int 21h
- mov di,bp
- pop bp
- lds si,DWO [bp+__tid]
- mov [si],ax
- lds si,DWO [bp+__maxsz]
- mov [si],dx
- lds si,DWO [bp+__ses]
- mov [si],di
- mov ax,0
- jnc gre1
- dec ax ;ret -1 if err
- gre1: POPM <ds,di,si>
- pop bp
- ret
- _get_redir_entry endp
-
- END_MOD
- end
-