Several storage operations retrieve different pieces of information. This flow documents and centralizes the information for those operations.
1. Register the application and at the end unregister it, as described in the Storage: Register Application, Perform Task, Unregister Application flow. You should have the session handle and application handle available.
2. As part of the “Perform Task” step, perform one or more of the following operations.
a. Retrieve the number of bytes available for use by the application by invoking AMT_ThirdPartyDataStorageService.GetBytesAvailable with the session handle as an input parameter. The method returns the number of bytes that the application may allocate as an output parameter.
Click here for a snippet
demonstrating this step
You can execute this snippet by inserting it into the execution template found here.
$thirdPartyDataStorageServiceRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_ThirdPartyDataStorageService WHERE Name='Intel(r) AMT Third Party Data Storage Service'")
$inputObject = $thirdPartyDataStorageServiceRef.CreateMethodInput("GetBytesAvailable")
# $sessionHandle is the session handle returned by 'RegisterApplication' method.
$inputObject.SetProperty("SessionHandle", $sessionHandle.ToString())
$outputObject = $thirdPartyDataStorageServiceRef.InvokeMethod($inputObject)
$returnValue = $outputObject.GetProperty("ReturnValue")
if($returnValue -like "0")
{
$bytesAvailable = $outputObject.GetProperty("BytesAvailable")
}
b. Retrieve the handles of all registered applications that have the same vendor name by invoking AMT_ThirdPartyDataStorageService.GetRegisteredApplications with the session handle as an input parameter. The method returns an array of application handles as the single output parameter.
Click here for a snippet demonstrating this step
You can execute this snippet by inserting it into the execution template found here.
$thirdPartyDataStorageServiceRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_ThirdPartyDataStorageService WHERE Name='Intel(r) AMT Third Party Data Storage Service'")
$inputObject = $thirdPartyDataStorageServiceRef.CreateMethodInput("GetRegisteredApplications")
# $sessionHandle is the session handle returned by 'RegisterApplication' method.
$inputObject.SetProperty("SessionHandle", $sessionHandle.ToString())
$outputObject = $thirdPartyDataStorageServiceRef.InvokeMethod($inputObject)
$returnValue = $outputObject.GetProperty("ReturnValue")
if($returnValue -like "0")
{
$appHandles = $outputObject.GetProperty("AppHandles")
}
c. Retrieve application attributes for an application by invoking AMT_ThirdPartyDataStorageService.GetApplicationAttributes with the session handle and an application handle (retrieved in step 2b), as input parameters. The method returns the vendor name and application name of the given application, as string output parameters. Each string has a maximum of 64 characters.
Click here for a snippet demonstrating this step
You can execute this snippet by inserting it into the execution template found here.
$thirdPartyDataStorageServiceRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_ThirdPartyDataStorageService WHERE Name='Intel(r) AMT Third Party Data Storage Service'")
$inputObject = $thirdPartyDataStorageServiceRef.CreateMethodInput("GetApplicationAttributes")
# $sessionHandle is the session handle returned by 'RegisterApplication' method.
$inputObject.SetProperty("SessionHandle", $sessionHandle.ToString())
# $applicationHandle is the application handle returned by 'GetCurrentApplicationHandle' method.
$inputObject.SetProperty("ApplicationBeingRequested", $applicationHandle.ToString())
$outputObject = $thirdPartyDataStorageServiceRef.InvokeMethod($inputObject)
$returnValue = $outputObject.GetProperty("ReturnValue")
if($returnValue -like "0")
{
$vendorName = $outputObject.GetProperty("VendorName")
$applicationName = $outputObject.GetProperty("ApplicationName")
}
3. Unregister the application when done. See Storage: Register Application, Perform Task, Unregister Application.
Additional
Information
It is not possible for a storage application to retrieve the handles of other, arbitrary applications. It is possible to retrieve only the handles of other applications with the same vendor name.
Instance Diagram
Not applicable
Classes Used in This Flow
SDK Sample
Located at:<SDK_root> \Windows\Intel_AMT\Samples\WS-Management\Storage
See Also: |
• Storage Concepts and Objects |
Copyright © 2006-2012, Intel Corporation. All rights reserved. |