To identify a printer driver if the printer driver is a Black Ice printer driver, one can check if a printer DEVMODE structure belongs to a Black Ice printer by comparing the size of the DEVMODE structure (dmSize + dmDriverExtra) to the size of the BlackIceDEVMODE structure (sizeof(BlackIceDEVMODE)).
To help identifying Black Ice printers and make identification more reliable, starting with version 13.50, the szUser2 field, in the BlackIceDEVMODE structure contains the “Black Ice Software, LLC” string (DM_BLACKICE_SOFTWARE_LLC defined in devmode.h).
To check if a DEVMODE structure belongs to a Black Ice printer, compare the size of the printer DEVMODE structure (dmSize + dmDriverExtra) to the size of the BlackIceDEVMODE structure (sizeof(BlackIceDEVMODE)). If size matches, compare the value of szUser2 field to the value of the DM_BLACKICE_SOFTWARE_LLC macro. (Please note, the BlackIceDEVMODE structure contains Unicode strings)
Please see section “MEMBERS OF THE BlackIceDEVMODE STRUCTURE” for TCHAR szUser2[128] field: