PosPrinter.FromIdAsync(String) Method

Definition

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

The DeviceInformation.Id that identifies a specific point-of-service printer.

Returns

IAsyncOperation<PosPrinter>

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.

Applies to

See also