DmiUnregisterCiCmd instructs the service layer to remove a direct component instrumentation interface from the service layer's table of registered interfaces. The call uses the DmiUnregisterCiInd block.
The format for the command block is: ┌──────────────────────────────────────────────────────────────────────────────┐
Variable Name
│ Table 47. DmiUnregisterCiInd Command Block │
├───────────────┬───────────────┬───────────────┬──────────────────────────────┤
│ OFFSET │ SIZE │ TYPE │ VARIABLE NAME │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ 0 │ 64 │ STRUCT │ DmiMgmtCommand │
├───────────────┼───────────────┼───────────────┼──────────────────────────────┤
│ 64 │ 4 │ INT │ iCiHandle │
└───────────────┴───────────────┴───────────────┴──────────────────────────────┘
DmiMgmtCommand
Variable Description
Issuing DmiUnregisterCiInd displays an example of how to issue the DmiUnregisterCiInd
command to the CI. IssuingDmiUnregisterCiInd
ULONG UnRegisterCI(ULONG iCiHandle)
{
DMI_UnRegisterCiInd_t *ciUnRegister;
ULONG RC = SLERR_OUT_OF_MEMORY;
DMI_MgmtCommand_t *dmiCommand;
ciUnRegister = malloc(sizeof(DMI_UnRegisterCiInd_t));
if(ciUnRegister != (DMI_UnRegisterCiInd_t *)NULL){
memset(ciUnRegister,0,sizeof(DMI_UnRegisterCiInd_t)); // clear out the whole thing first
dmiCommand = &(ciUnRegister->DmiMgmtCommand);
dmiCommand->iLevelCheck = DMI_LEVEL_CHECK;
dmiCommand->iCommand = DmiUnregisterMgmtCmd;
dmiCommand->iCmdLen = sizeof(DMI_UnRegisterCiInd_t);
ciUnRegister->iCiHandle = iCiHandle; // assign the ID from install time
RC = DmiInvoke((DMI_MgmtCommand_t *)ciUnRegister);
free(ciUnRegister);
}
return RC;
}