次の方法で共有


WRLSNOTIFY (Compact 2013)

3/26/2014

This structure stores the name of the callback function that is called when wireless devices are added or removed.

Syntax

typedef struct { 
    PFN_WRLSPOWERSTATUSCHANGE pfnCallback;
    BOOL bGetDesired;
    LPARAM lParam;
} WRLSNOTIFY;

Members

  • pfnCallback
    Name of the callback function that is called whenever a device is added or removed.
  • bGetDesired
    Boolean value that determines whether or not to retrieve the desired state of each device from the registry. The desired state is contained in the dwDesired member of the RDD structure.
  • lParam
    User data that is passed back to the callback function whenever it is called. For example, the GetAndMonitorWirelessDevices function can use this member to cache the thread handle of the device monitoring thread.

Remarks

The callback function must conform to the following prototype.

typedef HRESULT (*PFN_WRLSPOWERSTATUSCHANGE )(RDD *pRD, DWORD dwFlags, LPARAM lParam);

It is called whenever a device is added or removed. The dwFlags parameter specifies whether the device was added or removed. The pRD structure is a linked list of the device(s) that were just added or removed. It is the callback function's responsibility to free these structures.

The following table shows the possible values that may be passed in the dwFlags parameter of the callback function.

Flag

Value

Description

WLSCB_EMPTY

1

The message queue is now empty. This may accompany one or none of the other flags.

WLSCB_ADD

2

The device has been added.

WLSCB_ADD

4

The device has been removed.

Requirements

Header

wrlspwr.h

See Also

Reference

Wireless Device Power Management Structures