Share via


CDeviceRemoteTool (Windows Embedded CE 6.0)

1/6/2010

This class is used as a namespace for device side API calls.

All methods are static.

Public Enumerations

Enumeration Description

CDeviceRemoteTool::COMMANDHANDLER_TYPE

Enumerations for the command handler type.

enum  COMMANDHANDLER_TYPE {
  COMMANDHANDLER_SYNC = 1,
  COMMANDHANDLER_ASYNC = 2
}
Enumerator Description

COMMANDHANDLER_SYNC

Use this for a synchronous command (initiated by the desktop).

COMMANDHANDLER_ASYNC

Use this for an asynchronous command (initiated by the device).

Static Public Member Functions

Member Description

StartCommandHandler

This function will initialize the framework on the device and prepare the framework to call your callback function.

InitializeService

This function is only required if you are writing a device side tool that only pushes data to the desktop and does not respond to desktop commands. You call this function or StartCommandHandler, but not both. Only use InitializeService if you want complete control over the stream. UnInitializeService must be called if you call InitializeService.

UnInitializeService

This function should be called when terminating the program and you initialized with InitializeService. You don’t need to call this if you call StartCommandHandler.

WaitOnCommandHandler

This function will block until the asynchronous command handler is completed. If you pass COMMANDHANDLER_ASYNC to StartCommandHandler you can use this function to block until all commands have been sent to your callback function.

StopCommandHandler

This function forces the asynchronous callback handling to terminate.

CreateCommand

This function will create a CCommandPacket object you can use to push data to the desktop.

FreeCommand

This function will free the CCommandPacket object created by CDeviceRemoteTool::CreateCommand.

PushCommand

This function sends a command to the desktop and is used when you want to push data to the desktop asynchronously.

Ee503813.collapse(en-US,WinEmbedded.60).gifMember Function Details

StartCommandHandler

HRESULT CDeviceRemoteTool::StartCommandHandler (
  WCHAR *szService,
  COMMANDHANDLER_TYPE type,
  pfnCommandCallback cbFunction
) [static]

szService - [in] The GUID matching the desktop tool.

type - [in] The type of service. Either asynchronous or synchronous.

cbFunction - [in] The function the framework will call when the desktop sends commands.

InitializeService

HRESULT CDeviceRemoteTool::InitializeService(
  WCHAR *szService
) [static]

szService - [in] The GUID string matching the desktop tool.

UnInitializeService

HRESULT CDeviceRemoteTool::UnInitializeService( ) [static]

WaitOnCommandHandler

HRESULT CDeviceRemoteTool::WaitOnCommandHandler( ) [static]

StopCommandHandler

HRESULT CDeviceRemoteTool::StopCommandHandler( ) [static]

CreateCommand

HRESULT CDeviceRemoteTool::CreateCommand(
  CCommandPacket **ppCmdData
) [static]

ppCmdData - [out] The newly created CCommandPacket object.

FreeCommand

HRESULT CDeviceRemoteTool::FreeCommand(
  CCommandPacket *pCmdData
) [static]

pCmdData - [in] CCommandPacket object to free.

PushCommand

HRESULT CDeviceRemoteTool::PushCommand(
  DWORD dwCmd,
  CCommandPacket *pCmdData
) [static]

dwCmd - [in] The CommandId property of the CommandPacket when the desktop receives the command.

pCmdData - [in] CCommandPacket object with the data.

Requirements

Header cecorecon.h
Platform Builder Windows Embedded CE 6.0 Platform Builder Service Pack 1 and later

See Also

Reference

Remote Tools Framework Classes
Remote Tools Framework Reference