📄 ifsmgr.inc
字号:
;* DPL - DOS Parameter List
;
; Parameter list structure for the "Server DOS Call".
DPL32 STRUC
DPL32_EAX DD ? ; EAX register
DPL32_EBX DD ? ; EBX register
DPL32_ECX DD ? ; ECX register
DPL32_EDX DD ? ; EDX register
DPL32_ESI DD ? ; ESI register
DPL32_EDI DD ? ; EDI register
DPL32_EBP DD ? ; EBP register
DPL32_UID DW ? ; User (Machine) ID (0 = local macine)
DPL32_PID DW ? ; Process ID (0 = local user PID)
DPL32_DTA DD ? ; Flat pointer to DTA (instead of CurDTA)
DPL32_FLAGS DB ? ; Control flags
DPL32_PAD DB 3 DUP (?) ; pad to dword boundry
DPL32 ENDS
DPL32W STRUC
DPL32_AX DW ? ; AX register
DW ?
DPL32_BX DW ? ; BX register
DW ?
DPL32_CX DW ? ; CX register
DW ?
DPL32_DX DW ? ; DX register
DW ?
DPL32_SI DW ? ; SI register
DW ?
DPL32_DI DW ? ; DI register
DW ?
DPL32_BP DW ? ; BP register
DW ?
DPL32_PID32 DD ? ; 32-bit process ID
DPL32W ENDS
DPL32B STRUC
DPL32_AL DB ? ; AL register
DPL32_AH DB ? ; AH register
DW ?
DPL32_BL DB ? ; BL register
DPL32_BH DB ? ; BH register
DW ?
DPL32_CL DB ? ; CL register
DPL32_CH DB ? ; CH register
DW ?
DPL32_DL DB ? ; DL register
DPL32_DH DB ? ; DH register
DPL32B ENDS
;low 2 bits of DPL32_FLAGS specify character set as follows:
DPL32_USE_ANSI equ 0
DPL32_USE_OEM equ 1
DPL32_USE_UNICODE equ 2
DPL32_8_3_MATCHING equ 4
;** IFSMgr_CompleteAsync
;** IFSMgr_RegisterHeap - Register as a user of the net heap
;
; This service is not valid until IFSMgr performs SysCriticalInit.
;
; This call allows a user of the net heap to register a
; scavenger routine for use by the heap manager.
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; Entry TOS - address of scavenger routine (0 if none)
; TOS+4 - debug flag. (0 if VNetSup_RetHeap called to free heap)
; Exit None
; Uses C registers (eax, ecx, edx, flags)
;** IFSMgr_GetHeap - Allocate a chunk of the net heap
;
; This service is not valid until IFSMgr performs SysCriticalInit.
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; Entry TOS - Size required
; Exit EAX - address of heap chunk. 0 if failure
; Uses C registers (eax, ecx, edx, flags)
;** IFSMgr_RetHeap - Free a chunk of net heap
;
; This service is not valid until IFSMgr performs SysCriticalInit.
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; Entry TOS - address of heap chunk
; Exit None
; Uses C registers (eax, ecx, edx, flags)
;** IFSMgr_CheckHeap - check heap consistancy
;
; 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.
;
; Entry TOS - DWORD pointer to heap item (0 for none)
; TOS+4 - DWORD pointer to ASCIIZ filename
; TOS+8 - DWORD line number
; Exit 0 if no error found, non-zero if problem hit.
; Uses C registers (eax, ecx, edx, flags)
;** IFSMgr_CheckHeapItem - check heap item consistancy
;
; 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.
;
; NOTE: This call is not valid on freed heap items if
; VNetSup_RetHeap is not used to free the heap item.
;
; Entry TOS - DWORD pointer to heap item
; TOS+4 - DWORD pointer to ASCIIZ filename
; TOS+8 - DWORD line number
; TOS+12- DWORD 0 if item is expected to be free
; 1 if item is expected to be busy
; 2 if don't know
; Exit 0 if no error found, non-zero if problem hit.
; Uses C registers (eax, ecx, edx, flags)
;** IFSMgr_FillHeapSpare
;** IFSMgr_Block
;** IFSMgr_Wakeup
;** IFSMgr_Yield
;** IFSMgr_SchedEvent
;** IFSMgr_QueueEvent
;** IFSMgr_KillEvent
;** IFSMgr_FreeIOReq
;** IFSMgr_MakeMailSlot - Make a MailSlot
;
; A VxD calls this service to make a MailSlot.
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; The read procedure is declared as follows:
; int _cdecl ReadProc(void *pdata, uint len, uchar lana);
;
; Entry TOS = Procedure to be called for mailslot reads
; TOS+4 = pointer ASCIIZ mailslot name (without the "\MAILSLOT\")
; TOS+8 = pointer to INT to receive the mailslot handle
; Exit EAX = error code, 0 for success
; caller clears argument from stack
; Uses C Registers
;** IFSMgr_DeleteMailSlot - Delete a MailSlot
;
; A VxD calls this service to delete a MailSlot.
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; Entry TOS = mailslot handle received from IFSMgr_MakeMailSlot
; Exit EAX = error code, 0 for success
; caller clears argument from stack
; Uses C Registers
;** IFSMgr_WriteMailslot
;
; A VxD calls this service to delete a MailSlot.
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; Entry TOS = pointer to ASCIIZ name (without the "\MAILSLOT\"
; TOS+4 = pointer to data
; TOS+8 = length of data
; TOS+12 = network number
; TOS+16 = pointer to remote name data was received from (or 0 if local)
; immediately followed by local name. both names are 16 bytes long
; TOS+17 = pointer to transport dependant info
; Exit none
; Uses C Registers
;** IFSMgr_PopUp
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; This service is called to put up a popup.
;
; Entry TOS - VMHandle
; TOS+4 - Message Box Flags (MB_SystemModal will be set by VNetSup)
; TOS+8 - Message number
; TOS+12 - Device ID
; Exit EAX - return from SHELL_SYSMODAL_Message
; Uses C registers (eax, ecx, edx, flags)
;** IFSMgr_printf - printf to the debug console
;
; This service is not valid until IFSMgr performs DeviceInit.
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; NOTE: On a non-debug build this routine will return without
; doing anything.
;
; Entry TOS - DWORD pointer to ASCIIZ format string
; TOS+n - parameters as required
; Exit None
; Uses C registers (eax, ecx, edx, flags)
;** IFSMgr_AssertFailed - Print an AssertFailed message
;
; This service is not valid until IFSMgr performs DeviceInit.
;
; This procedure uses the C6 386 _cdecl calling sequence
;
; NOTE: On a non-debug build this routine will return without
; doing anything.
;
; Entry TOS - DWORD pointer to ASCIIZ message
; TOS+4 - DWORD pointer to ASCIIZ filename
; TOS+8 - DWORD line number
; Exit None
; Uses C registers (eax, ecx, edx, flags)
;** 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.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -