The following List Component commands use the DmiListComponentReq command block:
The format for the command block is: ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³Table23
.DmiListComponentReqCommandBlock ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ OFFSET ³ SIZE ³ TYPE ³ VARIABLE NAME ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 0 ³ 64 ³ STRUCT ³ DmiMgmtCommand ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 64 ³ 4 ³ INT ³ iComponentId ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 68 ³ 4 ³ OFFSET ³ osClassString ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 72 ³ 4 ³ INT ³ iGroupKeyCount ³
ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÅÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
³ 76 ³ 4 ³ OFFSET ³ oGroupKeyList ³
ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
Variable Name
DmiListComponentCmd
For example, if an application is looking for all component ID groups, it uses the string "DMTF|ComponentID|". Because the version string is missing, the service layer considers any version a match, as long as the first two fields match. If no filtering is desired, set this field to zero or to an empty class string ("||").
Issuing DmiListComponentReq displays an example of how to issue the DmiListComponentReq
command to the MI. IssuingDmiListComponentReq
ULONG IssueListComp(ULONG ComponentID,SHORT ListType) // issues the list component command to the SL { DMI_ListComponentReq_t *ListComp; ULONG RC; ListComp = (DMI_ListComponentReq_t *)malloc(sizeof(DMI_ListComponentReq_t)); memset((void *)ListComp,0,sizeof(DMI_ListComponentReq_t)); ListComp->DmiMgmtCommand.iLevelCheck = DMI_LEVEL_CHECK; ListComp->DmiMgmtCommand.iMgmtHandle = YOUR_MGMT_HANDLE; // set the app handle ListComp->DmiMgmtCommand.iCmdHandle = YOUR_COMMAND_HANDLE; // set the command handle ListComp->DmiMgmtCommand.iCnfBufLen = 8000UL; // set the size of the response buffer ListComp->DmiMgmtCommand.pCnfBuf = (void *)malloc(8000UL); // set up the response buffer ListComp->DmiMgmtCommand.iRequestCount = 1; ListComp->DmiMgmtCommand.iCmdLen = sizeof(DMI_ListComponentReq_t); ListComp->iComponentId = ComponentID; switch(ListType){ case 1: ListComp->DmiMgmtCommand.iCommand = DmiListFirstComponentCmd; // set the command break; case 0: ListComp->DmiMgmtCommand.iCommand = DmiListNextComponentCmd; // look for next one in list break; case 10: ListComp->DmiMgmtCommand.iCommand = DmiListComponentCmd; break; } if((RC = DmiInvoke((DMI_MgmtCommand_t *)ListComp)) != SLERR_NO_ERROR){ // call the SL and register free(ListComp->DmiMgmtCommand.pCnfBuf); // free up the confirm buffer first free(ListComp); // then free up the command block } return RC; }