Your browser does not allow scripts
Please click here to view a static table of contents without scripts
Event On Surprise Removal
Return to Introduction  Previous page  Next page
The Event On Surprise Removal option is generally left unselected. If an application sets SERIAL_EV_EVENT2 (see NTDDSER.H) in it's event bitmask and this feature is enabled, the driver will signal this event on surprise removal.

The Event On Surprise Removal option is controlled through bit 5 of byte 0 of the first DWORD of the ConfigData entry
in the FTDIPORT.INF file. This is the same entry that contains the Baud rate table.


The first DWORD is shown in bold in the INF fragment below.

[FtdiPort232.NT.HW.AddReg]  
HKR,,"ConfigData",1,01,00,3F,3F,10,27,88,13,C4,09,E2,04,71,02,38,41,9C,80,4E,C0,34,00,1A,00,0D,00,06,40,03,80,00,00,D0,80  
 

Please note that this entry is byte-reversed, so MSB the DWORD reads
3F 3F 00 01
and the least significant bit is Bit 0. When disabled (no event on surprise removal), the DWORD would read 3F 3F 00 01. When enabled (event on surprise removal), the DWORD would read 3F 3F 00 21.

These values are held in the registry under this key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\FTDIBUS\{Device VID, PID and serial number}\0000\Device Parameters\ConfigData