⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ifsmgr.inc

📁 用于查询PC机上的USB端口是否有设备挂接上
💻 INC
📖 第 1 页 / 共 5 页
字号:
;	An FSD using this service to register itself always gets a 
;	priority of FS_DEFAULT_PRIORITY. To specify a priority, the
;	FSD must use the service IFSMgr_RegisterFSDWithPriority.
;
;       This procedure uses the C6 386 _cdecl calling sequence
;
; Entry TOS     = Entrypoint for providers mount routine
;       TOS + 4 = Version of IFSMGR provider was built for
;       TOS + 8 = pointer to device name strings( in unicode) registered
;
; Exit  Provider ID (-1 if error)
;
; Uses  C Registers

;**     IFSMgr_Win32MapExtendedHandleToSFT - map an extended handle to a SFT
;
;       This service allocates a free SFT and maps an extended handle to this
;       SFT. It returns the index to the SFT back to the caller. This api is
;       for the purpose of redirection for Win32 apps when they spawn DOS apps.
;       The SFT and the extended handle track one another from this point on.
;       This service MUST be called in the context of the DOS VM the SFT is
;       going to be in.
;
;       This procedure uses the C6 386 _cdecl calling sequence
;
;       int IFSMgr_Win32MapExtendedHandleToSFT( ulong ExtHandle, ushort *psfn );
;
; Entry TOS     = Extended handle to be mapped
;       TOS + 4 = PSP extended handle is on
;       TOS + 8 = Pointer to variable to contain the SFN
;
; Exit  EAX = 0 if no error, *psfn contains the SFN
;       EAX = non-zero errorcode if error
;
; Uses  C Registers

;**     IFSMgr_DbgSetFileHandleLimit - set limit for extended handles.
;
;       This procedure sets the maximum number of extended handles available
;       in the system. The limit is rounded up to the nearest multiple of 256.
;       This is a debug-only service and is provided mainly for testing
;       purposes to exhaust the available handles quicker. On a retail build,
;       it returns without doing anything.
;
;       This procedure uses the C6 386 _cdecl calling sequence
;
;       int IFSMgr_DbgSetFileHandleLimit( unsigned long MaxHandles );
;
; Entry TOS     = Handle limit to be set
;
; Exit  EAX = -1 if the limit passed in was invalid
;           = 0 if the limit was successfully set
;
; Uses  C Registers

;**     IFSMgr_Win32MapSFTToExtendedHandle - map a SFT to an extended handle
;
;       This service maps an already existing SFT handle to an extended
;       handle. This service will work only for SFT handles that are on
;       drives supported by the IFS manager.
;
;       This procedure uses the C6 386 _cdecl calling sequence
;
;       int IFSMgr_Win32MapSFTToExtendedHandle( ushort DOSHandle, ulong *pExtHandle );
;
; Entry TOS     = DOS handle to be mapped
;       TOS + 4 = Pointer to variable to contain the extended handle
;
; Exit  EAX = 0 if no error, *pExtHandle contains the extended handle
;       EAX = non-zero errorcode if error
;
; Uses  C Registers

;**     IFSMgr_InstallFileSystemApiHook - install a filesystem api hook
;
;       This service installs a filesystem api hook for the caller. This
;       hook is between the IFS manager and a FSD. So, the hooker gets to see
;       any calls that the IFS manager makes to FSDs.
;
;       This procedure uses the C6 386 _cdecl calling sequence
;
;       ppIFSFileHookFunc IFSMgr_InstallFileSystemApiHook( pIFSFileHookFunc HookFunc )
;
; Entry TOS     = Address of function that is to be installed as the hook
;
; Exit  EAX = Pointer to variable containing the address of the previous
;               hooker in this chain.
;
; Uses  C registers

;**     IFSMgr_RemoveFileSystemApiHook - remove previously installed api hook
;
;       This service removes a previously installed filesystem api hook. The
;       hook can be removed dynamically at any time even if there have been
;       other hookers installed on top of this hook.
;
;       This procedure uses the C6 386 _cdecl calling sequence
;
;       int IFSMgr_RemoveFileSystemApiHook( pIFSFileHookFunc HookFunc )
;
; Entry TOS     = Address of function that is to be installed as the hook
;
; Exit  EAX = 0 if success, non-zero for failure (invalid hook function)
;
; Uses  C registers

;**     IFSMgr_RunScheduledEvents - run events if any have been scheduled
;
;       Checks to see if any scheduled global events are waiting and performs
;       a nested ResumeExec if so.
;
; Entry nothing
;
; Exit  carry set if no events were found, clear otherwise
;

;**	IFSMgr_CheckDelResource - check/delete all connections for resource.
;
;	This service deletes all active connections on the requested shell
;	resource. A force level is passed in so that the appropriate checks are
;	made before blowing the resource away. The FSD is called via its
;	disconnect entry point to disconnect the resource. There is also a flag
;	passed in so that this service can be called only to check if the
;	resource can be successfully deleted without really deleting it.
;
;       This procedure uses the C6 386 _cdecl calling sequence
;
;	int IFSMgr_CheckDelResource( pshres psr, int force, int fDelFlag );	
;
; Entry	TOS	= pointer to IFS resource handle passed in on connect
;	TOS+4	= force level to use (0-4)
;	TOS+8	= delete flag
;			non-zero = delete resource
;			0 = just check for deletion
;
; Exit		Returns 0 if success, errorcode if failure

;**	IFSMgr_Win32GetVMCurdir - return current directory for given drive
;
;	This service returns the current directory path for a given drive in the
; 	current VM context. If the drive is owned by the IFS, we use our IfsCDS
; 	structure for the current directory. Otherwise, we look in the real-mode
; 	CDS and extract the current directory for the drive.
;
;       This procedure uses the C6 386 _cdecl calling sequence
;
;	int IFSMgr_Win32GetVMCurdir( int wDrive, void far *pCurdirBuf );
;
; Entry	TOS = 0-based drive number
;	TOS+4 = ptr to buffer to contain curdir
;
; Exit	EAX = 0 if successful
;	  pCurdirBuf contains curdir. Note that the path returned does not have
;	  "D:\" i.e. a curdir of root will be a null path. The path is always
;	  returned in the OEM character set for DOS consistency reasons.
;	EAX = errorcode, if failure

;**	IFSMgr_SetupFailedConnection - api call out on the connect operation
;
;	This service is used by the ifs manager to export a connect operation
;	when it has been failed by all registered net providers. Any VxD can
;	hook this service and then establish a fake connection.
;
;	This procedure uses the C6 386 _cdecl calling sequence
;
;	int IFSMgr_SetupFailedConnection( pioreq pir, unsigned long *ProId );
;
; Entry	TOS = pointer to ioreq structure(filled in for connect operation)
;	TOS+4 = pointer to variable to contain provider id if connection done
;
; Exit	EAX = 0 if successful, errorcode if failure.

;**     _GetMappedErr - returns the mapped error from the ext. error
;
; Entry TOS     = int21 function number
;       TOS+4   = Extended Error Code
;
; Exit  (eax) = Mapped error code
;
; Uses  C registers  (eax, ecx, edx, flags)
;


;***	IFSMgr_GetLockState - get lock state for specified drive
;
;	This service is provided to allow file system clients
;	(e.g., Compressed Volume Managers) to query if the
;	specified drive is locked.
;
;	This service uses the C calling convention.
;
;	ENTRY	driveno - volume drive number (0 = A:, ...)
;		pdwtype - pointer to DWORD in which to return type
;		pdwflags - pointer to DWORD in which to return flags
;		pdwowner - pointer to DWORD in which to return owning thread
;
;		NULL may be passed in for any of the above pointer
;		values if the caller does not wish to see the
;		corresponding return value.
;
;	RETURN	int - error code (0 if successful)
;
;	USES	EAX, ECX, EDX, Flags

;**	IFSMgr_Win32_Get_Ring0_Handle
;
;	This routine returns a ring 0 handle for a given extended handle. There
;	are certain conditions under which the ring 0 handle is not returned
;	because we must get an int 21h to send the i/o request down as follows:
;		1. This handle is not an extended handle.
;		2. We are in Win31 filesystem mode.
;		3. There is an app in the VM that has hooked int 21h.
;	If none of these conditions are triggered, the ring 0 handle is
;	returned for the next read/write operation. This service also returns
;	the current position of the file since the caller does not have any
;	idea of the current file position.
;
;	Entry	EBX = extended handle
;
;	Exit	CY clear --> handle mapped successfully,
;			EBX = ring 0 handle
;			EDX = current file position
;		CY set 	 --> handle was not mapped
;			EBX is preserved in this case
;
;	Uses	EAX, ECX

;**	IFSMgr_SetLoopback
;
;	This routine is intended to be called by a server to add a loopback
;	path to ifsmgr's loopback path list.
;
;	This routine uses the __cdecl calling convention.
;
;	ENTRY	pszUNCPath   - ansi string of the form \\<server>\<share>
;		pszLocalPath - ansi string of the form <drive>:<path>
;
;	RETURN	nothing
;
;	USES	EAX, ECX, EDX, Flags

;**	IFSMgr_ClearLoopback
;
;	This routine is intended to be called by a server to remove a
;	loopback path from ifsmgr's loopback path list.
;
;	This routine uses the __cdecl calling convention.
;
;	ENTRY	pszUNCPath   - ansi string of the form \\<server>\<share>
;
;	RETURN	nothing

;**	IFSMgr_ParseOneElement
;
;	This routine is intended to be called on a single path element i.e 
;	a filename or directory name, path separators are not allowed. It
;	parses this name and returns the parse flags for it in the
;	FILE_FLAG_* format defined in ifs.h. Callers can use this service to
;	determine whether the name passed in is a shortname or LFN.
;
;	This routine uses the __cdecl calling convention
;
;	int IFSMgr_ParseOneElement( string_t pstr );
;
;	Entry	pstr = ptr to path element in unicode format
;
;	Exit	EAX = parse flags, if no error the following flags are returned:
;			FILE_FLAG_IS_LFN = path element is LFN
;			FILE_FLAG_HAS_STAR = path element contains '*' wildcard
;			FILE_FLAG_WILDCARDS = path element contains wildcards
;			FILE_FLAG_HAS_DOT = path element contains a dot char
;		EAX = -1 if there was a parse error
;
;	Uses	C registers

;**	IFSMgr_DeregisterFSD - unload a previously registered FSD
;
;	This routine is called to dynamically unload an FSD that has already
;	been loaded. Note that there is no need for this to be called when the
;	system is shutting down. This call can handle the unloading of all the
;	various types of FSDs that can be present in the system. A force level
;	can also be specified to indicate what level of cleanup is allowed. If
;	the specified force level is not high enough for all the cleanup to be
;	done, the unload operation will be failed.
;
;	Entry	FSDType = type of FSD being deregistered
;			   (FSD types are defined in ifs.h/ifs.inc)
;		ProID	= provider id of FSD
;		Force	= force level to use
;		Version	= version of IFSMgr used by FSD
;
;	Exit	EAX = 0 if deregistration is successful, errorcode otherwise
;
;	Uses	C registers

;**	IFSMgr_RegisterFSDWithPriority - register FSD with certain priority
;
;	This is a new service that has been added to provide FSDs with the
;	ability to register at a certain priority level. The previous FSD
;	registration services now default to a priority of FS_PRIORITY_DEFAULT.
;	This is a single service that can be used for all kinds of FSDs.
;
;	This service uses the _cdecl calling convention.
;
;	Entry	FSDType		= type of FSD to be registered
;					(look in ifs.h/ifs.inc for definitions)
;		EntryPoint	= entry point of FSD
;		Priority	= priority level of FSD
;					(look in ifs.h/ifs.inc for definitions)
;		SplParam	= extra parameter passed in. This parameter
;				  has different semantics depending on the FSD
;				  type as follows:
;			Local FSD: flag indicating normal/default FSD
;			Net FSD:   contains the network OEM id
;			Mailslot:  the parameter is ignored (must be passed in)
;			CFSD:	   pointer to device name strings
;		Attributes	= level of support provided by FSD
;					(look in ifs.h/ifs.inc for definitions)
;		Version		= version of IFSMgr FSD was built for
;
;	Exit	EAX contains provider id on success, -1 if error.
;
;	Uses	C registers

;**     IFSMgr_GetRing0FileHandle - given an IOREQ, return the IFS' ring 0 handle
;				associated with it
;
;       This function is called to obtain the IFSMgr's ring 0 file handle
;	associated with an IFSMgr IOREQ.  This function does not support
;	IOREQs associated with path-based or find-handle based APIs.  The
;	IFSMgr IOREQ must be a handle based IOREQ.
;
;       pfhandle IFSMgr_GetRing0FileHandle (pifsreq pir);
;
;	Entry	pir - pointer to IFS IOREQ
;
;	Exit	pfh - pointer to IFS ring 0 file handle associated with this IOREQ
;		A NULL returned idicates that either the IOREQ or handle associated
;		with the IOREQ is invalid.
;
;	Uses	C registers

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -