ConnMgrRegisterForStatusChangeNotification

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function registers a window handle for connection status notifications.

Syntax

HRESULT WINAPI ConnMgrRegisterForStatusChangeNotification(
  BOOL   fEnable,
  HWND   hWnd
);

Parameters

  • fEnable
    [in] Enables or disables status change notifications.
  • hWnd
    [in] Handle to the window to which to post status change notifications.

Return Values

This function returns the following values.

Value Description

S_OK

The function call was successful.

E_HANDLE

The supplied window handle is invalid.

E_ACCESSDENIED

The calling process does not have sufficient privileges to use this function.

Remarks

When any of the connections changes its state from connected to disconnected, or from disconnected to connected, ConnMgrRegisterForStatusNotification posts a CONNMGR_STATUS_CHANGE_NOTIFICATION_MSG message to the window that has the hWnd window handle. This function also posts a message when a new connection is created.

During the lifetime of the connection, any Connection Manager status constant can be passed to the notification window, in addition to the CONNMGR_STATUS_CONNECTED and CONNMGR_STATUS_DISCONNECTED constants. For more information, see Connection Manager Status Constants.

Requirements

Header connmgr_status.h
Library cellcore.lib
Windows Embedded CE Windows CE .NET 4.2 and later, Windows Embedded NavReady 2009
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

Connection Manager Functions