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

📄 ifsmgr.inc

📁 用于查询PC机上的USB端口是否有设备挂接上
💻 INC
📖 第 1 页 / 共 5 页
字号:
; Exit  None
;
; Uses  eax, ecx, edx, flags
;

;**     NotifyVolumeRemoval - called when a new volume is removed.
;       Updates the CDSs in all the VMs and updates IFSMGR data structs to
;       indicate this is no longer a supported volume
;
; Entry TOS = logical unit number for new volume
;
; Exit  None
;
; Uses  eax, ecx, edx, flags
;

;**     QueryVolumeRemoval - called when a new volume is to be removed.
;       Checks if there are any open files on he volume. If yes closes them
;       after querying the user. Then unmounts the FSD. 
;
; Entry TOS = logical unit number for new volume
;
; Exit  (eax) = 0 if successfull non-zero otherwise
;
; Uses  eax, ecx, edx, flags
;

;**     IFSMgr_FSDUnmountCFSD - called by a CFSD to unmount its resource. The
;       CFSD passes in the volume handle previously passed to it on its mount
;       and is called back to do the actual unmount operation. 
;
; Entry TOS = IFS manager volume handle
;
; Exit  (eax) = 0 if successfull non-zero otherwise
;
; Uses  C registers (eax, ecx, edx, flags)


;**     IFSMgr_GetConversionTablePtrs - called to obtain a ptr to a table
;       of conversion tables ptrs within the IFSmgr.  The ptrs reference
;       AVL-tree-based run-length encoded structs for converting 
;               UNICODE->ANSI
;               UNICODE->OEM
;               ANSI->UNICODE
;               OEM->UNICODE
;               UNICODE->UPPER (delta table)
;               UNICODE->UPPER (conversion table)
;       These tables are referenced by the routines MapUniToBCS and
;       MapBCSToUni UniToUpper implemented in unicode.asm.
;
;       This procedure uses the C6 386 _cdecl calling sequence
;
; Entry nothing
;
; Exit  ptr to following structure
;               dword   count of ptrs in following table
;               dword   flat-ptr to UniToWinAnsiTable (ring-0 data)
;               dword   flat-ptr to UniToOemTable (ring-0 data)
;               dword   flat-ptr WinAnsiToUniTable (ring-0 data)
;               dword   flat-ptr to OemToUniTable (ring-0 data)
;               dword   flat-ptr to UniToUpperDelta (ring-0 data)
;               dword   flat-ptr to UniToUpperTable (ring-0 data)
; Uses  eax
;


;;* See Ifs.h for function prototypes for:
;
;       IFSMgr_NetToDosTime
;       IFSMgr_DosToNetTime
;       IFSMgr_DosToWin32Time
;       IFSMgr_Win32ToDosTime
;       IFSMgr_NetToWin32Time
;       IFSMgr_Win32ToNetTime
;       IFSMgr_MetaMatch
;       IFSMgr_TransMatch
;       UniToBCS
;       UniToBCSPath
;       BCSToUni
;       UniToUpper


;**     IFSMgr_CheckAccessConflict - check if desired access can be granted
;
;       This function validates the desired access mode and
;       determines if the desired access to the file can be
;       granted.
;
;       int IFSMgr_CheckAccessConflict (fSoftCompatDisable, pf, pfn, cookie)
;
;       PARAMETERS
;               softCompatDisable
;                       - IN boolean which defeats "soft" share
;                         semantics if they are enabled.  The "soft"
;                         share semantics are in effect IFF the
;                         fSoftCompat flag is TRUE.
;                         Non-zero specifies "hard" share rules.
;               pf      - IN pointer to file mode descriptor
;                         specifying desired access
;               pfn     - IN pointer to enumeration function
;               cookie  - IN cookie for enumeration function
;       RETURN
;               0       - desired mode is compatable
;               (other) - error code


;**     IFSMgr_LockFile - lock a range of bytes in a file
;
;       This function is called to lock a range of bytes in
;       a file.  Locks may not overlap; a lock may not be of
;       of zero length.
;
;       int IFSMgr_LockFile (pp, offmin, cb, owner, fileinst)
;
;       PARAMETERS
;               pp                      - IN pointer to file cookie
;               offmin          - IN starting file offset of the lock
;               cb                      - IN length of the locked region
;               owner           - IN owner of the lock
;               fileinst        - IN open instance to which lock belongs
;               pp                      - OUT file cookie filled in
;       RETURN
;               0                       - Success
;               (other)         - error code


;**     IFSMgr_UnlockFile - unlock a range of bytes in a file
;
;       This function is called to unlock a range of bytes in
;       a file.  Locks may not overlap; a lock may not be of
;       of zero length; a lock may not extend beyond the
;       maximum file size; an unlock must match a lock exactly.
;
;       int IFSMgr_UnlockFile (pp, offmin, cb, owner, fileinst)
;
;       PARAMETERS
;               pp                      - IN pointer to file cookie
;               offmin          - IN starting file offset of the lock
;               cb                      - IN length of the locked region
;               owner           - IN owner of the lock
;               fileinst        - IN open file instance
;               pp                      - OUT file cookie possibly set to NULL
;       RETURN
;               0                       - Success
;               (other)         - error code


;**     IFSMgr_RemoveLocks - remove all locks for a given owner
;
;       This function is called to remove all locks from a file
;       for a specified owner.
;
;       If the special owner id 0 is passed in, then all locks on
;       the file are removed.
;
;       If the file instance is NULL, then locks are removed for
;       all instances.  So, to remove all locks, pass in owner 0
;       and file instance NULL.
;       
;       void IFSMgr_RemoveLocks (pp, owner, fileinst)
;
;       PARAMETERS
;               pp                      - IN pointer to file cookie
;               owner           - IN owner of the lock
;               fileinst        - IN open file instance
;               pp                      - OUT file cookie possibly set to NULL
;       RETURN
;               NONE


;**     IFSMgr_CheckLocks - check if an i/o operation violates a lock
;
;       This function is called to check if i/o over a
;       specified range would violate any locks on the file.
;       A range length of zero is interpreted to mean the
;       file is going to be truncated at the given offset;
;       any locks at or above the given offset will result in a
;       lock violation.
;
;       int IFSMgr_CheckLocks (p, offmin, cb, owner, fileinst)
;
;       PARAMETERS
;               p                       - file cookie
;               offmin          - starting file offset of the lock
;               cb                      - length of the locked region
;               owner           - owner of the lock
;               fileinst        - open file instance
;       RETURN
;               0                       - Success
;               (other)         - error code


;**     IFSMgr_CountLocks - count locks for a given file instance
;
;       This function is called to count all locks on a file
;       for a specified instance.
;
;       int IFSMgr_CountLocks (p, fileinst)
;
;       PARAMETERS
;               p                       - IN file cookie
;               fileinst        - IN open file instance
;       RETURN
;               int                     - count of locks for instance


;**     IFSMgr_ReassignLockInst - reassign file instances for existing lock list
;
;       This function is called to replace existing 'file instance' fields
;       in the lock list with a new 'file instance'.  This is done upon exit
;       from a level 4 exclusive lock when the IFS manager re-opens existing
;       files.  Typically, the FSD (at least VFAT) will create a new 'file
;       instance' (i.e. SFT) upon opening a file.  The IFS has saved the
;       'file instance' that was previously associated with the file and
;       passes it to the FSD when the open is done.  The FSD, after
;       obtaining the new file instance value, calls this service to
;       replace old file instances in the lock list with the new file
;       instance.  The owner of the lock must be marked as 'inactive' before
;       this substitution will occur.  After the substitution is made, the
;       'inactive' mark is removed from the owner.  This prevents erroneous
;       substitution is cases where the old file instance may happen to match
;       a new file instance that was previously substituted into the lock list.
;
;       int IFSMgr_ReassignLockFileInst (plkList, oldFileInst, newFileInst)
;
;       PARAMETERS
;               plkList         - IN pointer to lock list
;               oldFileInst     - IN previous open file instance
;               newFileInst     - IN new open file instance
;       RETURN
;               0                       - Success


;**     IFSMgr_UnassignLockList - mark all owners in this list 'inactive'
;
;       int IFSMgr_UnassignLockFileInst (plkList)
;
;       PARAMETERS
;               plkList         - IN pointer to lock list
;       RETURN
;               0                       - Success


;**     IFSMgr_MountChildVolume - mount a child volume
;
;       A child volume is a volume that is physically related to
;       some other volume, known as the parent.  For example, some
;       on-the-fly data compression schemes represent the compressed
;       volume as a file on an uncompressed volume.  In this example,
;       the uncompressed volume is the parent, and the compressed
;       volume is the child.
;
;       int IFSMgr_MountChildVolume (pvrp, driveno)
;
;       PARAMETERS
;               pvrp            - IN child volume VRP pointer
;               driveno         - IN child volume drive number (0 = A:, ...)
;       RETURN
;               0                       - Success
;               (other)         - error code


;**     IFSMgr_UnmountChildVolume - unmount a child volume
;
;       This service is provided to allow the unmounting of a child
;       volume on a specified drive.
;
;       We unmount the specified volume on the specified drive and
;       destroy the resource.  Why do we go to all this trouble?
;       For removable child volumes which are mounted automatically,
;       it is important to make the set of related volumes (i.e.,
;       the parent and its children) behave as a unit so that the
;       physical media volume tracks properly.  Thus, under normal
;       circumstances, the notification that a volume is going away
;       causes all of its relations to disappear as well.  This is
;       exactly what we *don't* want to happen in the case where
;       the user wishes to destroy one volume in a set.  By killing
;       the target here, before the volume removal notication is
;       received, we insure that there will be no way for the
;       volume removal to affect the other related volumes.  Sounds
;       complicated?  You bet it is!
;
;       int IFSMgr_UnmountChildVolume (pvrp, driveno)
;
;       PARAMETERS
;               pvrp            - IN child volume VRP pointer
;               driveno         - IN child volume drive number (0 = A:, ...)
;       RETURN
;               0                       - Success
;               (other)         - error code


;**     IFSMgr_SwapDrives - swap a parent and child drive
;
;       This service is provided to allow the drive letter
;       of a child volume and its parent to be swapped.
;
;       int IFSMgr_SwapDrives (pvrp, drive1, drive2)
;
;       PARAMETERS
;               pvrp            - IN VRP pointer
;               drive1          - IN first drive number (0 = A:, ...)
;               drive2          - IN second drive number (0 = A:, ...)
;       RETURN
;               0                       - Success
;               (other)         - error code


;**     IFSMgr_PNPEvent - report PNP events
;
;       int IFSMgr_PNPEvent( dword msg, dword res, dword flags )
;
;       PARAMETERS
;               msg             - IN one of:
;                                       DBT_DEVICEARRIVAL
;                                       DBT_DEVICEQUERYREMOVE
;                                       DBT_DEVICEQUERYREMOVEFAILED
;                                       DBT_DEVICEREMOVEPENDING
;                                       DBT_DEVICEREMOVECOMPLETE
;                                       DBT_DEVICETYPESPECIFIC
;                                       DBT_DEVICEDEVNODESCHANGED
;
;               volid           - IN Volume ID (A=0) r resource handle
;               flags           - IN
;                                   one of PNPT_x to specify type:
;                                       PNPT_VOLUME
;                                       PNPT_NET
;                                   'or'd with 0 or more:
;                                       (if PNPT_VOLUME)
;                                       DBTF_MEDIA
;                                       DBTF_NET
;                                       (if PNPT_NET)
;                                       DBTF_RESOURCE
;                                       DBTF_XPORT
;                                       
;       RETURN
;               one of PNPE_x

;**     IFSMgr_RegisterCFSD - register a character device provider
;
;	This service is called by an FSD that wants to hook a particular
;	character device(s).
;

⌨️ 快捷键说明

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