Share via


ConnMgrRegisterForStatusChangeNotification (Windows Embedded CE 6.0)

1/6/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

See Also

Reference

Connection Manager Functions