PosPrinter.FromIdAsync(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a PosPrinter object for point-of-service printer with the specified DeviceInformation.Id.
public:
static IAsyncOperation<PosPrinter ^> ^ FromIdAsync(Platform::String ^ deviceId);
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<PosPrinter> FromIdAsync(winrt::hstring const& deviceId);
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<PosPrinter> FromIdAsync(string deviceId);
function fromIdAsync(deviceId)
Public Shared Function FromIdAsync (deviceId As String) As IAsyncOperation(Of PosPrinter)
Parameters
- deviceId
-
String
Platform::String
winrt::hstring
The DeviceInformation.Id that identifies a specific point-of-service printer.
Returns
The point-of-service printer that the unique device identifier identifies. Returns a null object in the following cases:
- The specific printer is not found.
- Access is denied to the existing printer. The user can deny access to a device, which is not treated as an exception.
- Attributes
Remarks
The app package manifest must include the PointofService device capability. If the manifest omits this capability, this method returns null and no exception is generated.