Because the DMI is a data interface, all commands are specified with data blocks. In order for a management application to send a command block to the service layer, the application builds the command with the DmiMgmtCommand block and any following blocks and then issues the DmiInvoke() function call.
The DmiInvoke() function call sends the command to the service layer for processing. The C-language prototype for this call is:
unsigned long DmiInvoke(PTR command)
command is the complete command block. The return result is a 32-bit status value that indicates whether the command succeeded or failed. The possible status values are described in Status Codes.
While it processes the command, the service layer immediately returns control to the management application. The management application can then continue processing and issue additional commands, but the application cannot re-use the same DmiMgmtCommand buffer that it previously sent to the service layer. Simultaneous commands from a management application must use different DmiMgmtCommand blocks. When the service layer is finished processing the command, it notifies the management application by calling the pConfirmFunc() function that was given when the management application originally registered with the service layer. At that point, the management application can re-use the DmiMgmtCommand block.
The DMI specification does not include a time-out policy. If a management application issues a command and does not appear to get a response, the application should issue a cancel command. Implementing DMI on OS/2 describes how the SystemView Agent incorporates time restrictions on some operations.
For a description of the DmiMgmtCommand block and its contents, read DmiMgmtCommand Command Block.