When will class installer entry point be called?

Hi all,
I am writting a usb class installer under win98, but it’s entry point
is not called when system found new hardware(usb device), but if I
click cancel in the “found new hardware wizard” dialog or click next
till find the proper driver, my class installer is called with
DIF_REMOVE,DIF_ALLOW_INSTALL,DIF_INSTALLDEVICE,and
DIF_DESTROYPRIVATEDATA.
My question is: when will the class installer entry point be called
the first time, with which DI_FUNCTION? How to let my class installer
entry point be called before the “found new hardware wizard” dialog
appears?
Thanks for any assistance.

metawest