An application should create a new block either the first time it is registered, or when it needs additional space.
1. Register the application, as described in the Storage: Register Application, Perform Task, Unregister Application flow. You should have the session handle and application handle available.
2. Invoke AMT_ThirdPartyDataStorageService.AllocateBlock with the following input parameters:
Parameter | Description/Value |
SessionHandle | The session handle. |
BytesRequested | The size of the block in bytes. |
BlockHidden | Whether the block is to be hidden or not, as a Boolean. |
BlockName | The block name as a string of up to 32 characters. |
The handle of the new block is returned 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("AllocateBlock")
# $sessionHandle is the session handle returned by 'RegisterApplication' method.
$inputObject.SetProperty("SessionHandle", $sessionHandle.ToString())
$inputObject.SetProperty("BytesRequested", "4096")
$inputObject.SetProperty("BlockHidden", "true")
$inputObject.SetProperty("BlockName", "MyBlock")
$outputObject = $thirdPartyDataStorageServiceRef.InvokeMethod($inputObject)
$returnValue = $outputObject.GetProperty("ReturnValue")
if($returnValue -like "0")
{
$blockHandle = $outputObject.GetProperty("BlockHandle")
}
3. You must use the block handle for subsequent operations that require a block handle, such as reading or writing the block.
4. Unregister the application when done. See Storage: Register Application, Perform Task, Unregister Application.
Additional Information
Intel AMT allows multiple blocks to have the same name. It is the block handle which distinguishes one block from another.
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. |