The following figure illustrates the outline of the file system stream handler (FSSHT.DLL).

The descriptions for the sample file system stream handler modules shown in the example in section File System Stream Handler Modules are contained in the following table.

ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
³Procedure Name ³Description                                            ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³SHINIT.C       ³Receives control when FSSHT.DLL is loaded and performs ³
³               ³the following functions:                               ³
³               ³DLL_INITTERM  Initialization routine to                ³
³               ³              register the stream handler              ³
³               ³              with the Sync/Stream Manager             ³
³               ³              (SSM), allocate heap memory,             ³
³               ³              and create mutex semaphores.             ³
³               ³SHEXITLIST    Termination routine to                   ³
³               ³              deregister the stream handler,           ³
³               ³              destroy any active streams,              ³
³               ³              reload heap memory, and close            ³
³               ³              mutex semaphores.                        ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³SHROUTER.C     ³Receives the stream handler command (SHC) messages from³
³               ³SSM and routes them to the appropriate low-level       ³
³               ³routines.                                              ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³FSSHASS.C      ³Processes the SHC_ASSOCIATE stream handler command     ³
³               ³message to associate an object (file handler, CD ROM   ³
³               ³drive letter, and so on) with a data stream.           ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³SHEPROT.C      ³Processes the SHC_ENUMERATE stream handler command     ³
³               ³message to return a list of stream protocols for a     ³
³               ³given stream.                                          ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³SHGPROT.C      ³Processes the SHC_GET_PROTOCOL stream handler command  ³
³               ³message to return a stream protocol control block      ³
³               ³(SPCB) for a given data type.                          ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³SHIPROT.C      ³Processes the SHC_INSTALL_PROTOCOL stream handler      ³
³               ³command message to install or replace an SPCB for a    ³
³               ³given data type.                                       ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³FSSHCREA.C     ³Processes the SHC_CREATE stream handler command message³
³               ³to create a stream instance for a given data type and  ³
³               ³subtype. If the create is for a source stream handler, ³
³               ³a read thread in FSSHREAD.C is created. Otherwise a    ³
³               ³write thread is created in FSSHWRIT.C for a target     ³
³               ³stream handler.                                        ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³SHNEGOT.C      ³Processes the SHC_NEGOTIATE_RESULTS stream handler     ³
³               ³command message to save the negotiated SPCB for a given³
³               ³stream instance.                                       ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³SHSTART.C      ³Processes the SHC_START stream handler command message ³
³               ³to start the data streaming for a given stream         ³
³               ³instance. For a source stream handler, the read thread ³
³               ³in FSSHREAD.C is run. For a target stream handler, the ³
³               ³write thread in FSSHWRIT.C is run.                     ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³SHSTOP.C       ³Processes the SHC_STOP stream handler command message  ³
³               ³to stop the data streaming for a given stream instance.³
³               ³For a source stream handler, the read thread in all the³
³               ³buffers is either discarded (STOP DISCARD) or returned ³
³               ³to SSM (STOP FLUSH). For a target stream handler, the  ³
³               ³write thread in FSSHWRIT.C is blocked, with buffers    ³
³               ³either discarded or flushed.                           ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³FSSHSEEK.C     ³Processes the SHC_SEEK stream handler command message  ³
³               ³to seek to a specified point in the stream object. The ³
³               ³seek can be from the beginning of the file, the current³
³               ³position, or the end o the file. The seek point can be ³
³               ³specified in bytes offset or MMTIME units. This module ³
³               ³interfaces with low-level routines in SEEKCALC.ASM to  ³
³               ³perform conversion from MMTIME values to bytes, and    ³
³               ³with mmioSeek to perform the actual seek in the object.³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³SEEKCALC.ASM   ³Performs the low-level conversions of MMTIME to bytes, ³
³               ³and bytes to MMTIME, needed by FSSHSEEK.C.             ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³SHDESTRY.C     ³Processes the SHC_DESTROY stream handler command       ³
³               ³message to remove a stream instance. Either the read   ³
³               ³thread in FSSHREAD.C or the write thread in FSSHWRIT.C ³
³               ³is terminated when this message is received.           ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³SHMISC.C       ³Supporting routines used by the other stream handler   ³
³               ³modules; for example, searching the stream instance    ³
³               ³chain to find a particular stream instance, finding an ³
³               ³extended stream protocol control block (SPCB), and     ³
³               ³deallocating a stream instance.                        ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³FSSHREAD.C     ³Reads an object from the file system. A read thread is ³
³               ³created when the SHC_CREATE message is received in     ³
³               ³FSSHCREA.C and destroyed when the SHC_DESTROY message  ³
³               ³is received in SHDESTRY.C. The read is accomplished by ³
³               ³interfacing with a mmioRead routine and low-level      ³
³               ³routines in SHIOUTIL.C to check processing flags and   ³
³               ³report events to SSM.                                  ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³SHIOUTIL.C     ³Low-level routines used by FSSHREAD.C and FSSHWRIT.C   ³
³               ³modules. This module performs checks of processing     ³
³               ³flags and also reports processing events to SSM.       ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³FSSHDAT.C      ³Global data declaration for the stream handler         ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³makefile       ³Makefile to build FSSHT.DLL sample file system stream  ³
³               ³handler                                                ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ


[Back] [Next]