Share via


IRemoteToolDevice::DeployService (Compact 7)

3/12/2014

Deploys a service (package) to the device, starts the main executable in the service, and then establishes a stream-based connection with the main executable in the service.

This simply delegates to several methods in ICcConnection and the ICcConnection2 interface in the Core Connectivity native API, which are synchronous APIs.

If your application has a GUI, then we recommend that you call this method, along with anything associated with IRemoteToolStream, on a thread other than your primary UI thread so that your UI is not blocked by this synchronous operation.

Syntax

HRESULT DeployService([in] BSTR bstrService, [in] BOOL fToolHelp, [out] IRemoteToolStream **ppRemoteStream, [out] IRemoteToolStream **ppRemoteStreamPush)

Parameters

  • bstrService
    The ID of the service (package) to deploy.

    You must be prepared with the service ID, which must match the ID of a specific package in the Core Connectivity datastore.

  • fToolHelp
    Specifies whether Toolhelp.dll should be deployed to the device ahead of time.
  • ppRemoteStream
    The stream to use for sending commands to the target device.
  • ppRemoteStreamPush
    The stream to use for receiving commands from the device.

Return Value

E_INVALIDARG if bstrService, ppRemoteStream or ppRemoteStreamPush are NULL.

E_OUTOFMEMORY if there is insufficient memory to create either ppRemoteStream or ppRemoteStreamPush.

E_FAIL if there is no active connection created by calling IRemoteToolServer::ConnectToDevice.

S_OK if success.

Other error codes might be returned from ICcConnection2::DeployPackage, ICcConnection::DownloadPackage, or ICcConnection::CreateRemoteServiceStream. ICcConnection2::DeployPackage deploys a package based on a service package ID, and ICcConnection::CreateRemoteServiceStream creates a stream based on a service package ID.

See Also

Reference

IRemoteToolDevice
IRemoteToolServer::ConnectToDevice
ICcConnection::DownloadPackage