Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
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.
- Registering or unregistering a callback window does not work
when the device management service is not running.
Return Value
When starting or stopping the device management service, this function returns ahandle to the service instance, hService,if it succeeds, or NULL if it fails.
When getting the service status, this function returns hServiceif it succeeds, or NULL if it fails.
When registering or unregistering a callback window, this function returns hServiceif 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:
Copy Code | |
---|---|
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 |