次の方法で共有


FILECHANGEINFO (Windows Embedded CE 6.0)

1/6/2010

This structure contains information about a file system event.

Syntax

struct _FILECHANGEINFO {
  DWORD cbSize;
  LONG wEventId;
  ULONG uFlags;
  DWORD dwItem1;
  DWORD dwItem2;
  DWORD dwAttributes;
  FILETIME ftModified;
  ULONG nFileSize;
} FILECHANGEINFO, *LPFILECHANGEINFO;

Members

  • cbSize
    Size of this structure.
  • wEventId
    Describes the event that has occurred. Typically, only one event is specified at a time. If more than one event is specified, the values contained in the dwItem1 and dwItem2 members must be the same for all specified events.

    The following table shows possible values. The member can be set to one or more of these values.

    Value Description

    SHCNE_ASSOCCHANGED

    Not supported.

    SHCNE_ATTRIBUTES

    The attributes of an item or folder have changed. SHCNF_PATH must be specified in the uFlags member. The dwItem1 member contains a pointer to a string array that stores the item or folder that has changed. The dwItem2 member is reserved and must be set to NULL.

    SHCNE_CREATE

    A non-folder item has been created. SHCNF_PATH must be specified in uFlags. The dwItem1 membercontains a pointer to a string array that stores the item that was created. The dwItem2 member is not used and must be set to NULL.

    SHCNE_DELETE

    A non-folder item has been deleted. SHCNF_PATH must be specified in uFlags. The dwItem1 member contains a pointer to a string array that stores the item that was deleted. The dwItem2 member is reserved and must be set to NULL.

    SHCNE_DRIVEADD

    A drive has been added. SHCNF_PATH must be specified in uFlags. The dwItem1 member contains a pointer to a string array that stores the root of the drive that was added. The dwItem2 member is reserved and must be set to NULL.

    SHCNE_DRIVEADDGUI

    A drive has been added, and the shell must create a new window for the drive. SHCNF_PATH must be specified in uFlags. The dwItem1 member contains a pointer to a string array that stores the root of the drive that was added. The dwItem2 member is reserved and must be set to NULL.

    SHCNE_DRIVEREMOVED

    A drive has been removed. SHCNF_PATH must be specified in uFlags. The dwItem1 member contains a pointer to a string array that stores the root of the drive that was removed. The dwItem2 member is reserved and must be set to NULL.

    SHCNE_MEDIAINSERTED

    Storage media has been inserted into a drive. SHCNF_PATH must be specified in uFlags. The dwItem1 member contains a pointer to a string array that stores the root of the drive that contains the new media. The dwItem2 member is reserved and must be set to NULL.

    SHCNE_MEDIAREMOVED

    Storage media has been removed from a drive. SHCNF_PATH must be specified in uFlags. The dwItem1 member contains a pointer to a string array that stores the root of the drive from which the media was removed. The dwItem2 member is reserved and must be set to NULL.

    SHCNE_MKDIR

    A folder has been created. SHCNF_PATH must be specified in uFlags. The dwItem1 member contains a pointer to a string array that stores the folder that was created. The dwItem2 member is reserved and must be set to NULL.

    SHCNE_NETSHARE

    A folder on the local computer is being shared through the network. SHCNF_PATH must be specified in uFlags. The dwItem1 member contains a pointer to a string array that stores the folder that is being shared. The dwItem2 member is reserved and must be set to NULL.

    A connection was made to a remote server.

    SHCNE_NETUNSHARE

    A folder on the local computer is no longer being shared through the network. SHCNF_PATH must be specified in uFlags. The dwItem1 member contains a pointer to a string array that stores the folder that is no longer being shared. The dwItem2 member is reserved and must be set to NULL.

    A connection to a server has been removed.

    SHCNE_RENAMEFOLDER

    The name of a folder has changed. SHCNF_PATH must be specified in uFlags. The dwItem1 member contains a pointer to a string array that stores the previous name of the folder. The dwItem2 member contains a pointer to a string array that stores the name of the folder.

    SHCNE_RENAMEITEM

    The name of a non-folder item has changed. SHCNF_PATH must be specified in uFlags. the dwItem1 member contains a pointer to a string array that stores the name of the item. The dwItem2 member contains a pointer to a string array that stores the new name of the item.

    SHCNE_RMDIR

    A folder has been removed. SHCNF_PATH must be specified in uFlags. The dwItem1 member contains a pointer to a string array that stores the folder that was removed. The dwItem2 member is reserved and must be set to NULL.

    SHCNE_SERVERDISCONNECT

    The computer has disconnected from a server. SHCNF_PATH must be specified in uFlags. The dwItem1 member contains a pointer to a string array that stores the server from which the computer was disconnected. The dwItem2 member is reserved and must be set to NULL.

    SHCNE_UPDATEDIR

    The contents of an existing folder have changed, but the folder still exists and has not been renamed. SHCNF_PATH must be specified in uFlags. The dwItem1 member contains a pointer to a string array that stores the folder that has changed. The dwItem2 member is reserved and must be set to NULL. If a folder has been created, deleted, or renamed, use SHCNE_MKDIR, SHCNE_RMDIR, or SHCNE_RENAMEFOLDER, instead.

    SHCNE_UPDATEIMAGE

    An image in the system image list has changed. SHCNF_DWORD must be specified in uFlags. The dwItem1 member contains the index in the system image list that has changed. The dwItem2 member is reserved and must be set to NULL.

    SHCNE_UPDATEITEM

    An existing non-folder item has changed, but the item still exists and has not been renamed. SHCNF_PATH must be specified in uFlags. The dwItem1 member contains a pointer to a string array that stores the item that has changed. The dwItem2 memberis reserved and must be set to NULL. If a non-folder item has been created, deleted, or renamed, use SHCNE_CREATE, SHCNE_DELETE, or SHCNE_RENAMEITEM, instead.

  • uFlags
    Flags that indicate the meaning of the dwItem1 and the dwItem2 members. The following table shows possible values.

    Value Description

    SHCNF_DWORD

    The dwItem1 and the dwItem2 members are DWORD values. This flag is currently not supported.

    SHCNF_IDLIST

    The dwItem1 and the dwItem2 members are the addresses of ITEMIDLIST structures that represent the item(s) affected by the change. Each ITEMIDLIST must be relative to the desktop folder. This flag is currently not supported.

    SHCNF_PATH

    The dwItem1 and the dwItem2 members are pointers to string arrays that contain the full path names of the items affected by the change.

    SHCNF_PRINTER

    The dwItem1 and the dwItem2 members are pointers to string arrays that represent the friendly names of the printers affected by the change. This flag is currently not supported.

    The following table shows flags that modify other data-type flags. These flags cannot be used without one of the previously described values.

    Value Description

    SHCNF_FLUSHNOWAIT

    The function should begin delivering notifications to all affected components but should return as soon as the notification process has begun. If this flag is not set, this function does not return until the notification has been delivered to all affected components.

  • dwItem1

    First event-dependent value.

  • dwItem2

    Second event-dependent value.

  • dwAttributes
    Attributes of the file, folder, or item.
  • ftModified
    Time when the event occurred.
  • nFileSize
    Size of the file, folder, or item.

Remarks

All memory required for this structure must be allocated and freed by the file system driver (FSD).

The strings reported back by FILECHANGEINFO are limited to a MAX_PATH length, including NULL termination, because a file with a name longer than MAX_PATH-1 cannot exist.**

Requirements

Header extfile.h, shlobj.h
Library ceshell.lib
Windows Embedded CE Windows CE 2.10 and later

See Also

Reference

File I/O Structures

Other Resources

SHCHANGENOTIFYENTRY
ITEMIDLIST