📄 ifsmgr.inc
字号:
;** IFSMgr_LogEntry - Make a log entry in the net trace log
;
; This service is not valid until IFSMgr performs SysCriticalInit.
;
; This procedure uses the C6 _cdecl calling sequence
;
; NOTE: On a non-debug build this routine will return without
; doing anything.
;
; Entry TOS - DWORD Pointer to string of 4 chars to put in log
; TOS+4 - DWORD Info1 (first dword stored in log)
; TOS+8 - DWORD Info2 (second dword stored in log)
; TOS+12 - DWORD Stack Depth for return address (number of procedures)
; TOS+16 - DWORD Mask (only low word is significant)
; Exit None
; Uses C registers (eax, ecx, edx, flags)
;** IFSMgr_DebugMenu - print a menu and return addr of handler routine
;
; This service is not valid until IFSMgr performs SysCriticalInit.
;
; This routine uses the C6 386 _cdecl calling convention
;
; NOTE: On a non-debug build this routine will return 0 without
; doing anything.
;
; For 'C' declarations, include vnsmenu.h
;
; Entry TOS - DWORD pointer to menu table with last item set to 0.
; Exit EAX - address of debug routine to call (0 if exit requested)
; Uses C registers (eax, ecx, edx, flags)
;** DebugRoutine - handle a debug display request
;
; This routine uses the C6 386 _cdecl calling convention
;
; For 'C' declarations, include vnsmenu.h
;
; Entry TOS - DWORD pointer to remainder of command line (or 0)
; Exit EAX - 0 if debug should continue, non-zero for immediate exit
; to debugger.
; Uses C registers (eax, ecx, edx, flags)
IFSDbgMenu struc
IFSM_string dd ? ; menu string
IFSMM_pmh dd ? ; address of handler routine
IFSDbgMenu ends
;** IFSMgr_DebugVars
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; This service is called to get the address of IFSMgr debug vars
;
; Entry none
; Exit EAX - 0 if non debug build
; pointer to VNSDebugVars if debug
; Uses C registers (eax, ecx, edx, flags)
;** IFSMgr_GetDebugString
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; NOTE: On a non-debug build this routine will return without
; doing anything.
;
; Entry TOS - pointer to prompt string (without CR/LF)
; TOS+4 - pointer to buffer
; TOS+8 - length of buffer
; Exit EAX - exit code: 0 if ESC hit
; 1 if string put in buffer
; Uses C registers (eax, ecx, edx, flags)
;** IFSMgr_GetDebugHexNum
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; NOTE: On a non-debug build this routine will return without
; doing anything.
;
; Entry TOS - pointer to prompt string (without CR/LF)
; - pointer to dword to receive hex value
; Exit EAX - exit code: 0 if ESC hit
; 1 if string put in buffer
; Uses C registers (eax, ecx, edx, flags)
;** IFSMgr_NetFunction
;
; This routine is used by the ifsmgr to export int21 func 5f calls
; and int2f function 11 calls that are not supported directly by the
; ifsmgr. To handle these calls, an FSD should hook this service
; and process the requests. If the FSD doesn't understand a request
; it should pass the call on to the original address.
; A FSD gets a hook ID by calling IFSMgr_GetReqHookID. A custom preamble
; (set by calling IFSMgr_SetReqHook) puts the hook ID in ESI. This hook
; ID is then passed to NetFunction.
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; Entry TOS - ptr to ioreq structure
; TOS + 4 - ptr to user register structure
; TOS + 8 - hook ID (0 for all FSDs)
; Exit none
;
; Uses C registers (eax, ecx, edx, flags)
;** IFSMgr_DoDelAllUses
;
; This service is called by a net FSD to remove all redirections to
; drives managed by that FSD.
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; Entry TOS - ptr to ioreq structure
; Exit none
;
; Uses C registers (eax, ecx, edx, flags)
;** IFSMgr_SetErrString
;
; This routine accepts error strings from VxDs and stores
; them for use when handling Int2F function 5 (GetErrorText).
; It also handle strings for use with IFSMgr_Popup
;
; NOTE: The memory containing the error message must be left
; in memory. The IFS Manager keeps pointers to the
; strings rather than copying them.
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; Entry TOS - ptr to ASCIIZ error message
; TOS + 4 - Error code (only the low word used)
; TOS + 8 - table indicator, 0 = error code table, 1 = device name table
; Exit EAX - error code
; NOTICE: ERROR_ACCESS_DENIED means the error code
; is already in the table)
;** IFSMgr_GetErrString
;
; Given an error code, this routine will return a pointer to
; an error message if it is in the table.
;
; Entry TOS - Error code (only the low word used)
; TOS + 4 - table indicator, 0 = error code table, 1 = device name table
; Exit EAX - pointer to error message (0 if not available)
;** IFSMgr_SetReqHook - Set a custom preamble on the IFSManager Int21 Hook
;
; FSDs that need to handle Int21 Functions not normally handled by
; the IFSManager can use IFSMgr_SetReqHook to hook those functions.
; The FSD supplies a function number and the address of a preamble
; routine. When the IFSManager detects an Int21 with the given function
; number, it will route it to the preamble to see if the request should
; be hooked.
;
; This service returns the address of the old preamble. If the preamble
; does not hook the request, it must jump the old preamble.
;
; The entry/exit conditions for preambles are:
; Entry EBX - Handle of VM
; ECX - Function (value of users AH)
; EBP - Client register structure
; ESI - 0
; Exit if request is to be hooked
; Carry Clear
; EBX - Handle of VM
; EBP - Client register structure
; ESI - 0 or FSD ID
; Exit if request is not to be hooked
; jump to the old preamble with the entry conditions preserved
; Only EBX and EBP need to be preserved, ESI must be set properly
;
; Entry TOS - High word = Interrupt level (must be 21h)
; Low word = Function number (value to look for in AH)
; TOS + 4 - Entry point of preamble
; Exit EAX - 0 if error
; Previous preamble routine (preambles must chain) if success
;** IFSMgr_SetPathHook - Set a hook to identify custom path prefixs
;
; FSDs that look for special path prefixs to locate remote resources
; can use IFSMgr_SetPathHook to give IFSMgr the entrypoint of a routine
; that can identify a special path prefix.
;
; The entry/exit conditions for the path checker are:
; Entry ESI - ASCIIZ path (NOTE: ESI must be preserved)
; Exit Path recognized - return with:
; 'C' clear - Path recognized
; EAX - length of portion of path that is specific to FSD
; EDX - Provider ID of FSD claiming path
; 'Z' - Set if device check should be skipped in preamble
; Clear if device check should be performed in preamble
; Path not recognized - pass request it on next path checker.
; Uses EAX, EBC, ECX, EDX, EDI
;
; Entry TOS - Entry point of path checker
; Exit EAX - 0 if error
; Previous path checker (path checkers must chain) if success
;** IFSMgr_ChangeDir - Change Directory
;
; FSDs that need to cause a change the current path on a given drive
;
; Entry TOS - Pointer to IOReq
; ir_data - pointer to ASCIIZ path string
; ir_drv - set to default drive (needed if path string
; does not contain drive letter)
; TOS+4 - VM to change directory for. 0 for current VM.
; Exit ir_error set appropriately
;** IFSMgr_CDROM_Attach - Special service for CDFS to force a mount on a
; drive that is passed in. The VRP for the volume that is mounted on
; the drive is returned to the caller of the service. The caller can
; use this VRP to pass i/o requests down to the IO subsystem. The CDFS
; needs to handle direct ioctls from DOS applications on driveletters
; for which it has no volume parameters at all. If a volume is already
; mounted on the drive, the IFS manager returns the VRP for that volume
; without forcing a mount. Each call to attach increments the drive
; useage count.
;
; NOTE: This service works only under Chicago. It just returns success
; under Snowball.
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; The entry/exit conditions for this service are:
; Entry TOS - Driveletter (0-based)
; TOS + 4 - Pointer to dword to contain the VRP pointer
;
; Exit EAX - 0 if success. VRP pointer updated in variable.
; - Errorcode if failure.
;
; Uses C registers (eax, ecx, edx, flags)
;** IFSMgr_CDROM_Detach - Special service provided to the CDFS to indicate
; that it does not need to use the drive anymore. The drive useage count
; is decremented for every detach operation. If the drive useage count
; goes down to zero, the volume resource associated with the drive is
; automatically freed.
;
; NOTE: This service works only under Chicago.
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; The entry/exit conditions for this service are:
; Entry TOS - Driveletter (0-based)
; TOS + 4 - VRP pointer of drive returned on IFSMgr_CDROM_Attach
;
; Exit None
;
; Uses C registers (eax, ecx, edx, flags)
;** IFSMgr_Win32DupHandle - This service is provided for the Win32 VxD
; to do an inter-process dup. This service works for both extended
; handles and normal DOS handles.
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; int Win32DupHandle(pid_t srcpid, pid_t duppid, ulong *phandle,
; uchar flag,ulong *fReturnFlags )
;
; Entry TOS = process id of process issuing dup (must be current process)
; TOS+4 = process id of process handle is to be dup'ed into
; TOS+8 = ptr handle to be dup'ed (returns dup'ed handle)
; TOS+12 = flag to indicate kind of dup - normal or for memory-mapping
; TOS+16 = global Netware handle if running on real-mode NETX
; TOS+20 = ptr to variable to contain return flags (defined below)
;
; Exit EAX = 0 if success
; TOS+8 contains new handle
; TOS+16 contains return flags
; = errorcode if failure
;
; Uses C registers (eax, ecx, edx, flags)
; Return flag values for Win32DupHandle
WDUP_RMM_DRIVE equ 0001h ; file handle mapped to RMM drive
WDUP_NETWARE_HANDLE equ 0002h ; file handle belongs to Netware
;** IFSMgr_Get_Drive_Info - this service returns information about a
; given volume.
;
; Entry
; al = volume (A=0)
;
; Exit
; (carry clear)
; eax = flags
; FDRV_INT13 ; volume lives on an int13 drive
; FDRV_FASTDISK ; volume is on a drive for which a
; ; fastdisk driver is present
; FDRV_COMP ; compression driver detected on this volume
; FDRV_RMM ; volume can be accessed through RMM
; FDRV_USE_RMM ; volume must be accessed through RMM
; FDRV_DOS ; DBP exists for this volume... DOS
; ; knows about it
; FDRV_COMPHOST ; host volume for compression driver (dblspace)
; FDRV_N
;** Query_PhysLock - service to determined if current process has the
; int13 physical lock.
;
; Entry
; eax = int 13 unit number (0-7) or (80h-87h)
;
; Exit
; NC if the current process has the int 13 lock
; CY if the current process does not have the int 13 lock
;
; Uses ALL except ebx, edi
;
;** _VolFlush - volume based flush/invalidate
;
; Entry TOS = logical unit number to flush/invalidate
; TOS+4 = flags
; 0 ; just flush the cache
; VOL_DISCARD_CACHE ; flush and invalidate the cache
; VOL_REMOUNT ; flush and invalidate the cache
; ; & remount the vol (recompute
; ; the FAT "geometry" variables)
;
; Exit (eax) = non-zero if error on flush/invalidate
;
; Uses C registers (eax, ecx, edx, flags)
;
;** NotifyVolumeArrival - called when a new volume appears in the system.
; Updates the CDSs in all the VMs and updates IFSMGR data structs to
; indicate this is a new supported volume
;
; Entry TOS = logical unit number for new volume
;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -