A confirm message is sent if the pConfirmFunc() call is non-zero. The confirm message contains the DmiRegisterCnf block, as pointed to by pCnfBuf in the DmiMgmtCommand block.
The format for the command block is: ЪДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДї
і Table 22. DmiRegisterCnf Command Block і
ГДДДДДДДДДДДДДДДВДДДДДДДДДДДДДДДВДДДДДДДДДДДДДДДВДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДґ
і OFFSET і SIZE і TYPE і VARIABLE NAME і
ГДДДДДДДДДДДДДДДЕДДДДДДДДДДДДДДДЕДДДДДДДДДДДДДДДЕДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДґ
і 0 і 8 і STRUCT і DmiVersion і
ГДДДДДДДДДДДДДДДЕДДДДДДДДДДДДДДДЕДДДДДДДДДДДДДДДЕДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДґ
і 8 і 4 і INT і iDmiHandle і
АДДДДДДДДДДДДДДДБДДДДДДДДДДДДДДДБДДДДДДДДДДДДДДДБДДДДДДДДДДДДДДДДДДДДДДДДДДДДДДЩ
Variable Name
Processing DmiRegisterCnf displays an example of how to handle the DmiRegisterCnf
callback command block. For this example, all callbacks that are returned
to the management application are processed through a single entry point.
ProcessingDmiRegisterCnf
case DmiRegisterMgmtCmd: if(miCommand->iStatus == 0){ // all went well Response = (DMI_RegisterCnf_t *)miCommand->pCnfBuf; // type it first, it's easier AppInfo.myHandle = Response->iDmiHandle; Work = (DMI_STRING *)((char *)Response + Response->DmiVersion.osDmiSpecLevel); // point to the // MIF string memset(AppInfo.SpecLevel,0,sizeof(AppInfo.SpecLevel)); strncpy(AppInfo.SpecLevel,Work->body,Work->length); Work = (DMI_STRING *)((char *)Response + Response->DmiVersion.osImplDesc); memset(AppInfo.SLDescription,0,sizeof(AppInfo.SLDescription)); strncpy(AppInfo.SLDescription,Work->body,Work->length); // Do whatever your application needs to do here // to process the callback. } else{ // this is an error condition // Do whatever your application needs to do here // to process the error condition. } break;