Share via


StartCommandHandler (Windows Embedded CE 6.0)

1/6/2010

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

Syntax

RTFSUPP_API HRESULT StartCommandHandler(
  WCHAR *szService, 
  MANAGED_COMMANDHANDLER_TYPE type, 
  HWND hwndNotify, 
  UINT Msg
);

Parameters

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

    The framework will pass this to your program. You should pass the command line string from WinMain.

  • type
    [in] The type of service (asynchronous or synchronous).
  • hwndNotify
    The handle to a window that received a message when a command arrived.
  • Msg
    The ID of the message that was received.

Return Value

Returns S_OK on success.

The function can fail if the szService is NULL or if the framework cannot successfully connect to the desktop.

Remarks

If you call this function passing COMMANDHANDLER_ASYNC, you need to call StopCommandHandler as the process is terminiating. The framework will call your callback function when the desktop calls ProcessCommand.

The callback function prototype is pfnCommandCallback.

See Also

Reference

Remote Tools Framework Functions
Remote Tools Framework Reference