Share via


CeStartDevMgmtService (Windows Embedded CE 6.0)

1/6/2010

This function starts or terminates a device management service.

Syntax

HANDLE CeStartDevMgmtService(
  int nAction,
  HWND hCallbackWnd
);

Parameters

  • nAction
    [in] Specifies what action to take. The following table shows the values for this parameter.

    Value Description

    DEVMGMT_SVC_STOP

    Shut down the device management service.

    DEVMGMT_SVC_START

    Start the device management service.

    DEVMGMT_SVC_GETSTATUS

    Get the service started or stopped status.

    DEVMGMT_SVC_REGWND

    Register the callback window.

    DEVMGMT_SVC_UNREGWND

    Unregister the callback window.

  • hCallbackWnd
    [in] Specifies the window handle to be registered or unregistered. You should take the following things into consideration when registering or unregistering a callback window:

    • Registering or unregistering a callback window does not work when the device management service is not running.
    • If you call this function many times to register the same window, the scheduler registers it only once.
    • You do not need to unregister a callback window if the device management service is going to be shut down.

Return Value

When starting or stopping the device management service, this function returns a handle to the service instance, hService, if it succeeds, or NULL if it fails.

When getting the service status, this function returns hService if it succeeds, or NULL if it fails.

When registering or unregistering a callback window, this function returns hService if it succeeds, or NULL if it fails.

When starting the service, if the function succeeds, the return value is actually the handle from GetServiceHandle(_T("DMSO:"), NULL, NULL);

An application can use this API to register the callback window. When the task list or package database is changed, the callback window receives the following message:

Message: WM_REFRESH_DMSDATA
lParam: Should be DMS_CALLBACK_MAGIC
wParam:DMS_REFRESH_TASKS : task list is changed
DMS_REFRESH_DB : package list is changed

Requirements

Header devmgmt.h
Windows Embedded CE Windows CE .NET 4.2 and later

See Also

Reference

Device Management Client Functions

Concepts

API Access