During initialization, clients must identify the fast disk device or devices with which they will communicate. Clients usually attempt to locate a fast disk device during either the Device_Init or Init_Complete message. However, it is possible for a client to search the BDD chain at any point in time. Clients may attempt to locate a fast disk device either by examining the Interrupt 13h drive number in the BDD, or by searching for a particular device name.
Although the virtual block device notifies the Interrupt 13h device whenever a fast disk device that supports an Interrupt 13h device is installed, other clients, such as the swap file device, must request fast disk device information from the virtual block device. The virtual block device provides the BlockDev_Find_Int13_Drive and BlockDev_Get_Device_List services to help retrieve this information.
The BlockDev_Find_Int13_Drive service is provided as a convenience for clients that only understand how to communicate with fast disk devices that are standard Interrupt 13h drives. The swap file device's swap partition is created only on Interrupt 13h drives by the SwapFile utility. Therefore, the swap file device knows that it will always be communicating with a fast disk device that is also an Interrupt 13h drive.
However, this is just a restriction of the default swap file device. The swap file device could easily be extended to use other block device drivers such as dedicated hard drives that are used only for paging, and cannot be accessed through the standard Interrupt 13h ROM BIOS interface. Also, other virtual devices may need to communicate with block device drivers, such as tape drives, which do not use the Interrupt 13h ROM BIOS interface. To locate these device drivers, the client must call BlockDev_Get_Device_List to obtain a pointer to the head of a list of all currently installed block device drivers. The client can then scan this list, checking the name field of each BDD, until the appropriate device driver is located.
Once the address of a BDD of a fast disk device is located, that address is used to indicate the destination for commands when calling BlockDev_Send_Command.