Device Delete Functions

When a Device Delete request is received from the CMS, IDL calls the IDL Driver Instance (IDI) device delete callback that was registered during the init process. 

When the IDL calls the delete callback function (OnDevDelete), the IDI must perform a protocol specific delete and free all the protocol specific structures that it had allocated during device creation.

On completion, the IDI must call IdlDevDeleteResult with callback_index, pointer to IdlDev and the appropriate idlError (see Error Codes). 

Device Delete Callback Function

OnDevDelete 

IdlErrorCodes OnDevDelete(int callback_index, IdlDev *dev);

Device Delete Related Functions

IdlDevDeleteCallbackSet

void IdlDevDeleteCallbackSet(Idl *idl, int (*OnDevDelete)(int, IdlDev *));

Must be called by the IDI prior to calling IdlInit.

IdlDevDeleteResult 

void IdlDevDeleteResult(int callbackIndex, IdlDev *dev, int idlError);

Must be called by the IDI at the end of the callback function before exiting.