IFSMgr_Win32DupHandle
IFSMgr_Win32DupHandle(
pid_t srcPid,
pid_t dstPid,
unsigned long * pDupHandle,
unsigned char Flags,
unsigned long globalNWHandle,
unsigned long * fReturnFlags
)
This service is intended solely for the purpose of the Win32 subsystem. It should not be used by any other VxD in the system. It provides a duplicate handle for a given handle which is used for handle inheritance and memory-mapping. This service uses different methods to duplicate file handles based on whether the file handle is handled by the IFS manager, or by DOS, or by a third-party net-provider such as Netware.
- srcPid
- Supplies the process ID (DOS PSP) of the process that owns the file handle.
- dstPid
- Supplies the process ID (DOS PSP) of the process that needs a copy of this file handle.
- pDupHandle
- Supplies the handle number of the file handle that needs to be duplicated.
- Flags
- Supplies options for the duplication of the handle.
DupHandle Flags: |
|
Value |
Meaning |
DUP_NORMAL |
Indicates that this is a normal inter-process duplication. |
DUP_MEMORY_MAPPED |
Indicates that this is a duplication that needs to be done for memory-mapped files. The duplication for a memory-mapping done to a file is done in a special manner. |
- globalNWHandle
- Supplies a global handle used for duplication. This parameter is passed in only if the duplication is being done on a system running real-mode Netware NetX. Duplication of handles on Netware redirectors needs to be done in a special fashion.
- fReturnFlags
- Supplies a pointer to a variable that contains status flags the IFS manager returns.
- Returns 0 if success, errorcode if failure.
fReturnFlags |
Contains status flags returned by the IFS manager if the operation succeeded. The status flags are defined below. |
Status Flags: |
|
Value |
Meaning |
WDUP_RMM_DRIVE |
This flag is returned only if the DUP_MEMORY_MAPPED flag is passed in on the input parameters. It indicates that the memory-mapping has been done to a file that does not have protect-mode drivers, it uses real-mode drivers. The Win32 subsystem deals with this situation in a different manner. |
WDUP_NETWARE_HANDLE |
This flag is returned if the IFS manager detected that the handle belonged to a Netware-managed drive. The IFS manager does special processing for this case and the Win32 subsystem also does special processing. |